(argcv_get_n): Prevent coredump if command='"'
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment