regedit: Check if any hex data exists before attempting to parse it.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5cc1b227b7
commit
1a4c3e5d28
|
@ -363,9 +363,12 @@ static BOOL parse_data_type(struct parser *parser, WCHAR **line)
|
|||
WCHAR *end;
|
||||
DWORD val;
|
||||
|
||||
if (!**line)
|
||||
return FALSE;
|
||||
|
||||
/* "hex(xx):" is special */
|
||||
val = wcstoul(*line, &end, 16);
|
||||
if (!**line || *end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
|
||||
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
|
||||
return FALSE;
|
||||
|
||||
parser->data_type = val;
|
||||
|
|
Loading…
Reference in New Issue