[PATCH 2/2] regedit: Re-implement convertHextToDWord() (v3)
Alexandre Julliard
julliard at winehq.org
Mon Apr 10 14:06:20 CDT 2017
Hugh McMaster <hugh.mcmaster at outlook.com> writes:
> + while (*buf == ' ' || *buf == '\t') buf++;
> + if (!*buf) goto exit;
> +
> + p = buf;
> + while (isxdigit(*p))
> + {
> + count++;
> + p++;
> }
> - return TRUE;
> + if (count > 8) goto exit;
> +
> + end = p;
> + while (*p == ' ' || *p == '\t') p++;
> + if (*p && *p != ';') goto exit;
> +
> + *end = 0;
> + *dw = strtoul(buf, &end, 16);
> + ret = TRUE;
> +
> + exit:
> + if (!ret) output_message(STRING_INVALID_HEX);
> + HeapFree(GetProcessHeap(), 0, buf);
The pointer has been modified, you need to free the original one.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list