mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Fix buffer over-read in argsplit when trailing backslash occurs inside double quotes
This commit is contained in:
parent
a89b6f3126
commit
b4634578ba
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ unsigned argsplit(const char** split_map, unsigned split_max, char* str)
|
|||
/* double-quoted block */
|
||||
++str;
|
||||
while (*str != 0 && *str != '"') {
|
||||
if (*str == '\\' && strchr(dq_escapable, *(str + 1))) {
|
||||
if (*str == '\\' && *(str + 1) != 0 && strchr(dq_escapable, *(str + 1))) {
|
||||
++str;
|
||||
}
|
||||
*dst++ = *str++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue