[PATCH] crypt32: Add CRYPT_STRING_BINARY mode for CryptBinaryToStringW().
Dmitry Timoshkov
dmitry at baikal.ru
Thu Sep 27 03:34:39 CDT 2018
Nikolay Sivov <nsivov at codeweavers.com> wrote:
> +static BOOL EncodeBinaryToBinaryW(const BYTE *in_buf, DWORD in_len, DWORD flags, WCHAR *out_buf, DWORD *out_len)
> +{
> + BOOL ret = TRUE;
> +
> + if (out_buf)
> + {
> + if (*out_len < in_len)
> + {
> + SetLastError(ERROR_INSUFFICIENT_BUFFER);
> + ret = FALSE;
> + }
> + else if (in_len)
> + memcpy(out_buf, in_buf, in_len);
> + }
> + else
> +
> + *out_len = in_len;
> +
> + return ret;
> +}
Last else statement seems to be misplaced.
--
Dmitry.
More information about the wine-devel
mailing list