mirror of
https://github.com/reactos/reactos.git
synced 2025-04-29 10:39:07 +00:00
[REGEDIT][REG] Limit registry type to 8 hex digits when importing (#6063)
Matches Windows and lets the Wine13i test in regedit_winetest pass.
This commit is contained in:
parent
0c568c0c90
commit
e4d03f471b
2 changed files with 10 additions and 0 deletions
|
@ -276,7 +276,12 @@ static BOOL parse_data_type(struct parser *parser, WCHAR **line)
|
|||
|
||||
/* "hex(xx):" is special */
|
||||
val = wcstoul(*line, &end, 16);
|
||||
#ifdef __REACTOS__
|
||||
/* Up to 8 hex digits, "hex(000000002)" is invalid */
|
||||
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE) || end - *line > 8)
|
||||
#else
|
||||
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
|
||||
#endif
|
||||
return FALSE;
|
||||
|
||||
parser->data_type = val;
|
||||
|
|
|
@ -339,7 +339,12 @@ static BOOL parse_data_type(struct parser *parser, WCHAR **line)
|
|||
|
||||
/* "hex(xx):" is special */
|
||||
val = wcstoul(*line, &end, 16);
|
||||
#ifdef __REACTOS__
|
||||
/* Up to 8 hex digits, "hex(000000002)" is invalid */
|
||||
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE) || end - *line > 8)
|
||||
#else
|
||||
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
|
||||
#endif
|
||||
return FALSE;
|
||||
|
||||
parser->data_type = val;
|
||||
|
|
Loading…
Reference in a new issue