aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f23a3e1ff..80846da0f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13471,10 +13471,16 @@ init(void)
13471 if (!(end=strchr(*envp, '='))) 13471 if (!(end=strchr(*envp, '=')))
13472 continue; 13472 continue;
13473 13473
13474 /* make all variable names uppercase */ 13474 for (start = *envp;start < end;start++) {
13475 for (start = *envp;start < end;start++) 13475 /* make all variable names uppercase */
13476 *start = toupper(*start); 13476 *start = toupper(*start);
13477 13477
13478 /* replace invalid characters with underscores */
13479 if (!isdigit(*start) && !isalpha(*start) && *start != '_') {
13480 *start = '_';
13481 }
13482 }
13483
13478 /* skip conversion of variables known to cause problems */ 13484 /* skip conversion of variables known to cause problems */
13479 if ( strncmp(*envp, "SYSTEMROOT=", 11) == 0 || 13485 if ( strncmp(*envp, "SYSTEMROOT=", 11) == 0 ||
13480 strncmp(*envp, "COMSPEC=", 8) == 0 ) { 13486 strncmp(*envp, "COMSPEC=", 8) == 0 ) {