Michael Stefaniuc : dmsynth: Don't crash when Open() gets a DMUS_PORTPARAMS7.
Module: wine Branch: master Commit: 48fdc8e08c4150c74e6c740df82518405125541d URL: https://gitlab.winehq.org/wine/wine/-/commit/48fdc8e08c4150c74e6c740df825184... Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Mar 29 22:35:32 2023 +0200 dmsynth: Don't crash when Open() gets a DMUS_PORTPARAMS7. Wrong sizeof check: pointer instead of referenced structure. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53704 --- dlls/dmsynth/synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 121d9aadf35..3631bcfe784 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -163,7 +163,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_Open(IDirectMusicSynth8 *iface, DMU modified = TRUE; params->fShare = FALSE; - if (params->dwSize >= sizeof(params)) { + if (params->dwSize >= sizeof(*params)) { if (params->dwValidParams & DMUS_PORTPARAMS_FEATURES && params->dwFeatures) { if (params->dwFeatures & ~(DMUS_PORT_FEATURE_AUDIOPATH|DMUS_PORT_FEATURE_STREAMING)) { modified = TRUE;
participants (1)
-
Alexandre Julliard