winspool: [3/3] Add GetPrintProcessorDirectoryA

Alexandre Julliard julliard at winehq.org
Fri Jun 2 04:30:29 CDT 2006


Detlef Riekenberg <wine.dev at web.de> writes:

> +    if (ret) {
> +        needed =  WideCharToMultiByte( CP_ACP, 0, InfoW, -1, (LPSTR)Info, cbBuf, NULL, NULL);
> +        if (pcbNeeded) *pcbNeeded = needed;
> +        ret = (needed > cbBuf) ? FALSE : TRUE;

This check is wrong, WideCharToMultiByte will return 0 if the buffer
is too small.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list