Hugh McMaster hugh.mcmaster@outlook.com writes:
@@ -243,8 +243,17 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r { LPWSTR rest; DWORD val;
BOOL overflow = FALSE;
if (data[1] == 'x')
{
WCHAR *ptr = &data[2];
while (*ptr == '0')
ptr++;
if (strlenW(ptr) > 8)
overflow = TRUE;
} val = strtoulW(data, &rest, (data[1] == 'x') ? 16 : 10);
You won't be able to catch base 10 overflows this way. It probably needs a more general solution (and some more test cases...)