Commit 1a4c3e5d authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Check if any hex data exists before attempting to parse it.

parent 5cc1b227
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment