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>
This commit is contained in:
Hugh McMaster 2017-07-26 13:15:57 +00:00 committed by Alexandre Julliard
parent 79c3b610c4
commit 976c2aa649
1 changed files with 1 additions and 0 deletions

View File

@ -403,6 +403,7 @@ static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed)
str[val_idx] = str[str_idx];
break;
default:
if (!str[str_idx]) return FALSE;
output_message(STRING_ESCAPE_SEQUENCE, str[str_idx]);
str[val_idx] = str[str_idx];
break;