From: Hugh McMaster hugh.mcmaster@outlook.com
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/regedit/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 47ce233039e..353925da90e 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -201,7 +201,7 @@ static LPWSTR read_value(HWND hwnd, HKEY hKey, LPCWSTR valueName, DWORD *lpType, error_code_messagebox(hwnd, IDS_BAD_VALUE, valueName); goto done; } - if ( *lpType == REG_DWORD ) valueDataLen = sizeof(DWORD); + buffer = heap_xalloc(valueDataLen + sizeof(WCHAR)); lRet = RegQueryValueExW(hKey, valueName, 0, 0, (LPBYTE)buffer, &valueDataLen); if (lRet) {