1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-06 04:56:33 +00:00

EXEC address with consecutive spaces created additional empty arguments

This commit is contained in:
Gerhard Rieger 2008-07-17 21:49:52 +02:00
parent ad4bd0d9db
commit ae368e7cb9
4 changed files with 41 additions and 2 deletions

View file

@ -83,11 +83,11 @@ static int xioopen_exec(int argc, const char *argv[], struct opt *opts,
if (pargv[0] == NULL) pargv[0] = token; else ++pargv[0];
pargc = 1;
while (*strp == ' ') {
while (*++strp == ' ') ;
if ((pargc & 0x07) == 0) {
pargv = Realloc(pargv, (pargc+8)*sizeof(char *));
if (pargv == NULL) return STAT_RETRYLATER;
}
++strp;
pargv[pargc++] = tokp;
if (nestlex(&strp, &tokp, &len, ends, hquotes, squotes, nests,
true, true, false) < 0) {