Commit 4fc3aa9c 4fc3aa9c3ca61073536626a47841b2062de0fade by Sergey Poznyakoff

(argcv_get_n): Prevent coredump if command='"'

1 parent 36e44486
...@@ -348,8 +348,11 @@ argcv_get_n (const char *command, int len, const char *delim, const char *cmnt, ...@@ -348,8 +348,11 @@ argcv_get_n (const char *command, int len, const char *delim, const char *cmnt,
348 if ((command[start] == '"' || command[end] == '\'') 348 if ((command[start] == '"' || command[end] == '\'')
349 && command[end] == command[start]) 349 && command[end] == command[start])
350 { 350 {
351 if (start < end)
352 {
351 start++; 353 start++;
352 end--; 354 end--;
355 }
353 unquote = 0; 356 unquote = 0;
354 } 357 }
355 else 358 else
......