Module: wine Branch: master Commit: 90da210cb0a007d4d7e8d419461c3e86c363cadb URL: http://source.winehq.org/git/wine.git/?a=commit;h=90da210cb0a007d4d7e8d41946...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Fri Jul 21 08:47:15 2017 +0000
reg: Account for sizeof(WCHAR) when resizing the value name buffer during the query operation.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/reg/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/reg/reg.c b/programs/reg/reg.c index a6927d0..573c750 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -769,7 +769,7 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) else { max_value_len *= 2; - value_name = HeapReAlloc(GetProcessHeap(), 0, value_name, max_value_len); + value_name = HeapReAlloc(GetProcessHeap(), 0, value_name, max_value_len * sizeof(WCHAR)); } } else break;