(argcv_get_n): Prevent coredump if command='"'
Showing
1 changed file
with
5 additions
and
2 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 | start++; | 351 | if (start < end) |
352 | end--; | 352 | { |
353 | start++; | ||
354 | end--; | ||
355 | } | ||
353 | unquote = 0; | 356 | unquote = 0; |
354 | } | 357 | } |
355 | else | 358 | else | ... | ... |
-
Please register or sign in to post a comment