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;
|
WCHAR *end;
|
||||||
DWORD val;
|
DWORD val;
|
||||||
|
|
||||||
|
if (!**line)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* "hex(xx):" is special */
|
/* "hex(xx):" is special */
|
||||||
val = wcstoul(*line, &end, 16);
|
val = wcstoul(*line, &end, 16);
|
||||||
if (!**line || *end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
|
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
parser->data_type = val;
|
parser->data_type = val;
|
||||||
|
|
Loading…
Reference in New Issue