forked from Mirrors/wine-wine
regedit: Prevent out-of-bounds reads when unescaping a string (Valgrind).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>oldstable
parent
79c3b610c4
commit
976c2aa649
|
@ -403,6 +403,7 @@ static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed)
|
||||||
str[val_idx] = str[str_idx];
|
str[val_idx] = str[str_idx];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (!str[str_idx]) return FALSE;
|
||||||
output_message(STRING_ESCAPE_SEQUENCE, str[str_idx]);
|
output_message(STRING_ESCAPE_SEQUENCE, str[str_idx]);
|
||||||
str[val_idx] = str[str_idx];
|
str[val_idx] = str[str_idx];
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue