[PATCH 0/1] MR3035: mmdevapi: Fix "use-before-init" in set_driver_prop_value.
Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035
From: Torge Matthies <tmatthies(a)codeweavers.com> Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> --- dlls/mmdevapi/devenum.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index 2b7833edd08..8d6f00b0acb 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -244,6 +244,8 @@ static HRESULT set_driver_prop_value(GUID *id, const EDataFlow flow, const PROPE if (!drvs.pGetPropValue) return E_NOTIMPL; + PropVariantInit(&pv); + hr = drvs.pGetPropValue(id, prop, &pv); if (SUCCEEDED(hr)) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3035
What's the route for this to happen? Is `drv.pGetPropValue()` succeeding without updating `pv`? If so, with which driver? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035#note_35417
On Mon Jun 12 07:16:53 2023 +0000, Huw Davies wrote:
What's the route for this to happen? Is `drv.pGetPropValue()` succeeding without updating `pv`? If so, with which driver? I have not looked into that yet, I just discovered this problem because Battle.net refused to start with my latest Wine builds, and it was crashing in the PropVariantClear. I am however getting this in the log:
``` 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 0150:fixme:mmdevapi:MMDevice_SetPropValue Unhandled type 0 ``` (driver should be winepulse.drv with pipewire-pulse as server) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035#note_35421
Try !3045 (in particular the second commit). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035#note_35431
On Mon Jun 12 20:13:11 2023 +0000, Huw Davies wrote:
Try !3045 (in particular the second commit). That MR fixes the problem too, I will close this one.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035#note_35507
This merge request was closed by Torge Matthies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035
Ouch, sorry for causing the regression. Was it always reproducible? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3035#note_35582
participants (4)
-
Davide Beatrici (@davidebeatrici) -
Huw Davies (@huw) -
Torge Matthies -
Torge Matthies (@tmatthies)