diff options
-rw-r--r-- | shell/ash.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c index 7cad34511..878c76da4 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -13486,7 +13486,7 @@ init(void) | |||
13486 | * variable called something other than PATH. This suggests we | 13486 | * variable called something other than PATH. This suggests we |
13487 | * haven't been invoked from an earlier instance of BusyBox. | 13487 | * haven't been invoked from an earlier instance of BusyBox. |
13488 | */ | 13488 | */ |
13489 | char *start, *end; | 13489 | char *start, *end, *s; |
13490 | struct passwd *pw; | 13490 | struct passwd *pw; |
13491 | 13491 | ||
13492 | for (envp = environ; envp && *envp; envp++) { | 13492 | for (envp = environ; envp && *envp; envp++) { |
@@ -13503,16 +13503,16 @@ init(void) | |||
13503 | continue; | 13503 | continue; |
13504 | } | 13504 | } |
13505 | 13505 | ||
13506 | /* convert backslashes to forward slashes */ | 13506 | /* convert backslashes to forward slashes in value */ |
13507 | if (!xp) { | 13507 | if (!xp) { |
13508 | for ( ++end; *end; ++end ) { | 13508 | for ( s=end+1; *s; ++s ) { |
13509 | if ( *end == '\\' ) { | 13509 | if ( *s == '\\' ) { |
13510 | *end = '/'; | 13510 | *s = '/'; |
13511 | } | 13511 | } |
13512 | } | 13512 | } |
13513 | } | 13513 | } |
13514 | 13514 | ||
13515 | /* check for invalid characters */ | 13515 | /* check for invalid characters in name */ |
13516 | for (start = *envp;start < end;start++) { | 13516 | for (start = *envp;start < end;start++) { |
13517 | if (!isdigit(*start) && !isalpha(*start) && *start != '_') { | 13517 | if (!isdigit(*start) && !isalpha(*start) && *start != '_') { |
13518 | break; | 13518 | break; |