Hi,

There's a memory allocation on the stack in engines/e_capi.c which allocates only half of the required memory.
This then leads to stack corruption.
Attached a simple and small patch that fixes this.

Stefan
Index: e_capi.c
===================================================================
--- e_capi.c    (revision 26275)
+++ e_capi.c    (working copy)
@@ -1189,7 +1189,7 @@
         return 0;
     }
     if (sizeof(TCHAR) != sizeof(char))
-        name = alloca(len);
+        name = alloca(len * sizeof(WCHAR));
     else
         name = OPENSSL_malloc(len);
     if (!CryptEnumProviders(idx, NULL, 0, ptype, name, &len)) {
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to