[PATCH 2/3] winebus.sys: Make the device and instance IDs consistent.

Alexandre Julliard julliard at winehq.org
Tue Jun 4 10:56:53 CDT 2019


Zebediah Figura <zfigura at codeweavers.com> writes:

> +    DWORD len;
>  
> -    if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
> -        sprintfW(dst, formatW, ext->busid, ext->vid, ext->pid);
> +    if (ext->input == (WORD)-1)
> +    {
> +        len = snprintfW(NULL, 0, formatW, ext->busid, ext->vid, ext->pid);

This can't work, snprintfW returns -1 on overflow.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list