[PATCH 1/3] winhttp: Fix a buffer size check.

Hans Leidekker hans at codeweavers.com
Tue Jun 8 09:27:42 CDT 2021


Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 dlls/winhttp/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index f052c3c569c..1bdf39bca20 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -992,7 +992,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
             CertFreeCertificateContext( request->client_cert );
             request->client_cert = NULL;
         }
-        else if (buflen >= sizeof(cert))
+        else if (buflen >= sizeof(*cert))
         {
             if (!(cert = CertDuplicateCertificateContext( buffer ))) return FALSE;
             CertFreeCertificateContext( request->client_cert );
-- 
2.30.2




More information about the wine-devel mailing list