setupapi: Fix buffer overflow in SetupGetFileCompressionInfoW.

This commit is contained in:
Thomas Faber 2014-03-27 13:54:13 +01:00 committed by Alexandre Julliard
parent c8269c2cd7
commit b8c42020a9
1 changed files with 2 additions and 1 deletions

View File

@ -1412,7 +1412,8 @@ DWORD WINAPI SetupGetFileCompressionInfoW( PCWSTR source, PWSTR *name, PDWORD so
return ERROR_INVALID_PARAMETER;
ret = SetupGetFileCompressionInfoExW( 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 = SetupGetFileCompressionInfoExW( source, actual_name, required, &required,
source_size, target_size, type );