http://git.etersoft.ru/projects
/
wine
/
eterwine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd1b937
)
setupapi: Allocate the proper number of bytes for the drive spec.
author
Andrew Nguyen
<anguyen@codeweavers.com>
Sat, 15 Jan 2011 08:28:30 +0000
(
02:28
-0600)
committer
Alexandre Julliard
<julliard@winehq.org>
Mon, 17 Jan 2011 14:58:29 +0000
(15:58 +0100)
Spotted with Valgrind.
dlls/setupapi/diskspace.c
patch
|
blob
|
blame
|
history
diff --git
a/dlls/setupapi/diskspace.c
b/dlls/setupapi/diskspace.c
index 89cac077cdd3e214a8a659c4f8fc60273b4e4a1b..0a1a5ff7a753ec07b2cca71c3af0251dee1b4731 100644
(file)
--- a/
dlls/setupapi/diskspace.c
+++ b/
dlls/setupapi/diskspace.c
@@
-177,7
+177,7
@@
BOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC DiskSpace,
return FALSE;
}
- driveW = HeapAlloc(GetProcessHeap(), 0,
lstrlenW(DriveSpec) + 2
);
+ driveW = HeapAlloc(GetProcessHeap(), 0,
(lstrlenW(DriveSpec) + 2) * sizeof(WCHAR)
);
if (!driveW)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);