setupapi: Fix buffer overflow in SetupGetFileCompressionInfoW.
This commit is contained in:
parent
c8269c2cd7
commit
b8c42020a9
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue