ADVAPI32: Fix return value to indicate error when NULL string
is passed in
Alexandre Julliard
julliard at winehq.org
Wed May 16 07:29:23 CDT 2007
Rolf Kalbermatter <r.kalbermatter at hccnet.nl> writes:
> - if (ret)
> + if (ret || (!lpDisplayName && size))
> {
> if (lpDisplayName && *lpcchBuffer) *lpDisplayName = 0;
>
> - if (ret == ERROR_MORE_DATA)
> + if ((!ret && !lpDisplayName) || ret == ERROR_MORE_DATA)
These complex conditions make it really hard to figure out what the
code is doing. You should probably handle the NULL pointer as a
separate case.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list