mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 01:32:08 +00:00
Yesterday I make strsep_space include post-token whitespace,
so we should not be adding another " " between tokens. -Erik
This commit is contained in:
parent
ce4a586edb
commit
1ef92685cf
3
lash.c
3
lash.c
@ -1049,13 +1049,12 @@ static int expand_arguments(char *command)
|
||||
/* Convert from char** (one word per string) to a simple char*,
|
||||
* but don't overflow command which is BUFSIZ in length */
|
||||
for (i=0; i < expand_result.gl_pathc; i++) {
|
||||
length=strlen(expand_result.gl_pathv[i])+1;
|
||||
length=strlen(expand_result.gl_pathv[i]);
|
||||
if (BUFSIZ-total_length-length <= 0) {
|
||||
error_msg(out_of_space);
|
||||
return FALSE;
|
||||
}
|
||||
strcat(command+total_length, expand_result.gl_pathv[i]);
|
||||
strcat(command+total_length, " ");
|
||||
total_length+=length;
|
||||
}
|
||||
globfree (&expand_result);
|
||||
|
3
sh.c
3
sh.c
@ -1049,13 +1049,12 @@ static int expand_arguments(char *command)
|
||||
/* Convert from char** (one word per string) to a simple char*,
|
||||
* but don't overflow command which is BUFSIZ in length */
|
||||
for (i=0; i < expand_result.gl_pathc; i++) {
|
||||
length=strlen(expand_result.gl_pathv[i])+1;
|
||||
length=strlen(expand_result.gl_pathv[i]);
|
||||
if (BUFSIZ-total_length-length <= 0) {
|
||||
error_msg(out_of_space);
|
||||
return FALSE;
|
||||
}
|
||||
strcat(command+total_length, expand_result.gl_pathv[i]);
|
||||
strcat(command+total_length, " ");
|
||||
total_length+=length;
|
||||
}
|
||||
globfree (&expand_result);
|
||||
|
@ -1049,13 +1049,12 @@ static int expand_arguments(char *command)
|
||||
/* Convert from char** (one word per string) to a simple char*,
|
||||
* but don't overflow command which is BUFSIZ in length */
|
||||
for (i=0; i < expand_result.gl_pathc; i++) {
|
||||
length=strlen(expand_result.gl_pathv[i])+1;
|
||||
length=strlen(expand_result.gl_pathv[i]);
|
||||
if (BUFSIZ-total_length-length <= 0) {
|
||||
error_msg(out_of_space);
|
||||
return FALSE;
|
||||
}
|
||||
strcat(command+total_length, expand_result.gl_pathv[i]);
|
||||
strcat(command+total_length, " ");
|
||||
total_length+=length;
|
||||
}
|
||||
globfree (&expand_result);
|
||||
|
Loading…
Reference in New Issue
Block a user