From 69f9dc84adeaf5d42ffa28a2cd5b483f0c3a3ee6 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 27 Dec 2012 12:35:10 +0000 Subject: [PATCH] [SETUPAPI] * Fix allocating the required bytes in SetupGetFileCompressionInfoW. Brought to you by Peter Hater (7element {at} mail [dot] bg) CORE-6815 #resolve #comment Committed in r58018. Cheers ;) svn path=/trunk/; revision=58018 --- reactos/dll/win32/setupapi/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/misc.c b/reactos/dll/win32/setupapi/misc.c index fa35e3640fa..e8e70211d85 100644 --- a/reactos/dll/win32/setupapi/misc.c +++ b/reactos/dll/win32/setupapi/misc.c @@ -1448,7 +1448,7 @@ DWORD WINAPI SetupGetFileCompressionInfoA( PCSTR source, PSTR *name, PDWORD sour return ERROR_INVALID_PARAMETER; ret = SetupGetFileCompressionInfoExA( source, NULL, 0, &required, NULL, NULL, NULL ); - if (!(actual_name = MyMalloc( required ))) return ERROR_NOT_ENOUGH_MEMORY; + if (!(actual_name = MyMalloc( required*sizeof(WCHAR) ))) return ERROR_NOT_ENOUGH_MEMORY; ret = SetupGetFileCompressionInfoExA( source, actual_name, required, &required, source_size, target_size, type );