--- src/cmds/common_cmds.c.orig 2012-07-21 11:55:15.393624674 -0400 +++ src/cmds/common_cmds.c 2012-07-21 12:02:20.341749132 -0400 @@ -36,6 +36,17 @@ len_total = strlen(one_var); tmp_char = strchr(one_var, '='); + if (tmp_char == NULL) + { + /* The environment *should* always have an '=' sign, + * but if someone is manually setting envp with something + * like 'execve' then this isn't guaranteed. + * Just skip this element + */ + *name = NULL; + *value = NULL; + return(PBSE_BAD_PARAMETER); + } pos_eq = tmp_char - one_var; len_name = pos_eq; tmp_pos = pos_eq + 1;