Commit b8c42020 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

setupapi: Fix buffer overflow in SetupGetFileCompressionInfoW.

parent c8269c2c
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment