summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/engine.c
diff options
context:
space:
mode:
authorjsing <>2014-08-24 14:55:23 +0000
committerjsing <>2014-08-24 14:55:23 +0000
commit40a45ec968b50c59307461a7930e575da390a392 (patch)
treeb5a2e1744f832ba8feeedc5b2f75d581bc678149 /src/usr.bin/openssl/engine.c
parent45789545ff021977def84a5ba7eae1e93d4e2582 (diff)
downloadopenbsd-40a45ec968b50c59307461a7930e575da390a392.tar.gz
openbsd-40a45ec968b50c59307461a7930e575da390a392.tar.bz2
openbsd-40a45ec968b50c59307461a7930e575da390a392.zip
Let SSL_CIPHER_description() allocate the buffer for the description,
rather than passing in a fixed size buffer. This is yet another example of a horribly designed API - if the given buffer is NULL then SSL_CIPHER_description() allocates one for us (great!), which we then need to free (no problem). However, if this allocation fails it returns a pointer to a static string "OPENSSL_malloc Error" - obviously bad things happen if we call free() with this pointer. Unfortunately, there is no way of knowing that the function failed, other than comparing the returned string against the string literal - so do that before calling free()... Joint work with beck@ during g2k14.
Diffstat (limited to 'src/usr.bin/openssl/engine.c')
0 files changed, 0 insertions, 0 deletions