Hugh McMaster : reg: Fix dword conversion on 64-bit operating systems.
Alexandre Julliard
julliard at winehq.org
Fri Aug 19 08:19:04 CDT 2016
Module: wine
Branch: master
Commit: 8a8a753cfac54f20bf3cd768dbb0fcbfc2eb6abb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a8a753cfac54f20bf3cd768dbb0fcbfc2eb6abb
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Thu Aug 18 09:59:53 2016 +0000
reg: Fix dword conversion on 64-bit operating systems.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/reg/reg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 6fcf129..6522fe6 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -249,9 +249,9 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW
case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
{
LPWSTR rest;
- DWORD val;
+ unsigned long val;
val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
- if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) {
+ if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE) || val > ~0u) {
output_message(STRING_MISSING_INTEGER);
break;
}
More information about the wine-cvs
mailing list