From: Zebediah Figura Subject: [PATCH] msacm32: Correctly allocate WAVEFORMATEX. Message-Id: <20170531230358.13612-1-z.figura12@gmail.com> Date: Wed, 31 May 2017 18:03:58 -0500 Fixes https://bugs.winehq.org/show_bug.cgi?id=26388 Signed-off-by: Zebediah Figura --- 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