winhttp: Fix a buffer size check.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2021-06-08 16:27:42 +02:00 committed by Alexandre Julliard
parent c1733540d6
commit d66e834bfd
1 changed files with 1 additions and 1 deletions

View File

@ -992,7 +992,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
CertFreeCertificateContext( request->client_cert ); CertFreeCertificateContext( request->client_cert );
request->client_cert = NULL; request->client_cert = NULL;
} }
else if (buflen >= sizeof(cert)) else if (buflen >= sizeof(*cert))
{ {
if (!(cert = CertDuplicateCertificateContext( buffer ))) return FALSE; if (!(cert = CertDuplicateCertificateContext( buffer ))) return FALSE;
CertFreeCertificateContext( request->client_cert ); CertFreeCertificateContext( request->client_cert );