[PATCH] msacm32: Correctly allocate WAVEFORMATEX.

Zebediah Figura z.figura12 at gmail.com
Wed May 31 18:03:58 CDT 2017


Fixes https://bugs.winehq.org/show_bug.cgi?id=26388

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/msacm32/format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/msacm32/format.c b/dlls/msacm32/format.c
index de07cba9a3..ec46cae163 100644
--- a/dlls/msacm32/format.c
+++ b/dlls/msacm32/format.c
@@ -75,7 +75,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
 
 		afd.cbStruct = sizeof(afd);
 		afd.dwFormatTag = paftd->dwFormatTag;
-		afd.pwfx = HeapAlloc(MSACM_hHeap, 0, paftd->cbFormatSize);
+		afd.pwfx = HeapAlloc(MSACM_hHeap, 0, sizeof(WAVEFORMATEX) + paftd->cbFormatSize);
 		if (!afd.pwfx) return FALSE;
 		afd.pwfx->wFormatTag = paftd->dwFormatTag;
 		afd.pwfx->cbSize = paftd->cbFormatSize;
-- 
2.13.0




More information about the wine-patches mailing list