David Hedberg : shlwapi: Add room for null terminator in local SHGetShellKey buffer.
Alexandre Julliard
julliard at winehq.org
Wed Oct 27 12:50:58 CDT 2010
Module: wine
Branch: master
Commit: 8a4c60335ec41ae411c8193de3acf43ce0e89551
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a4c60335ec41ae411c8193de3acf43ce0e89551
Author: David Hedberg <dhedberg at codeweavers.com>
Date: Wed Oct 27 03:13:11 2010 +0200
shlwapi: Add room for null terminator in local SHGetShellKey buffer.
---
dlls/shlwapi/ordinal.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index b04fd9e..3c00b8e 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -4514,7 +4514,7 @@ HKEY WINAPI SHGetShellKey(DWORD flags, LPCWSTR sub_key, BOOL create)
else
size_user = 0;
- path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user);
+ path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user+sizeof(WCHAR));
if(!path) {
ERR("Out of memory\n");
return NULL;
More information about the wine-cvs
mailing list