[PATCH v4 2/3] mmdevapi: Don't clear possibly uninitialized PropVariant.

Andrew Eikum aeikum at codeweavers.com
Thu May 26 11:37:22 CDT 2022


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Thu, May 26, 2022 at 07:06:38PM +0300, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
> 
> The rest of the code path assumes it's uninitialized since it doesn't clear
> it first. Furthermore, the variant from MMDevPropStore_GetValue is passed
> directly to here, and that one is called from 3rd party code, not wine's.
> 
>  dlls/mmdevapi/devenum.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c
> index ed1daa8..1354bf3 100644
> --- a/dlls/mmdevapi/devenum.c
> +++ b/dlls/mmdevapi/devenum.c
> @@ -150,7 +150,7 @@ static HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
>      {
>          WARN("Reading %s returned %ld\n", debugstr_w(buffer), ret);
>          RegCloseKey(regkey);
> -        PropVariantClear(pv);
> +        pv->vt = VT_EMPTY;
>          return S_OK;
>      }
>  
> -- 
> 2.34.1
> 
> 



More information about the wine-devel mailing list