[openssl-dev] [patch] fix allocation in e_capi
Stefan Kueng
tortoisesvn at gmail.com
Fri Feb 13 18:20:44 UTC 2015
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
-------------- next part --------------
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)) {
More information about the openssl-dev
mailing list