diff options
author | tedu <> | 2014-04-24 17:13:11 +0000 |
---|---|---|
committer | tedu <> | 2014-04-24 17:13:11 +0000 |
commit | c963e3b0fb9c6db63183e97f988bfc8cf481b7fa (patch) | |
tree | 9aa3b2f7e74cea0ace24115598d320b508462aa5 /src/lib | |
parent | 7851c111fe7825001d582ec1645615cfa6071c0e (diff) | |
download | openbsd-c963e3b0fb9c6db63183e97f988bfc8cf481b7fa.tar.gz openbsd-c963e3b0fb9c6db63183e97f988bfc8cf481b7fa.tar.bz2 openbsd-c963e3b0fb9c6db63183e97f988bfc8cf481b7fa.zip |
obvious use after free was less obviously not a use after free.
who uses '\0' as a null pointer constant? fix my mistake and restore
original semantics.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/src/ssl/kssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libssl/src/ssl/kssl.c b/src/lib/libssl/src/ssl/kssl.c index 9e71eed9fa..b04c83e17f 100644 --- a/src/lib/libssl/src/ssl/kssl.c +++ b/src/lib/libssl/src/ssl/kssl.c | |||
@@ -963,7 +963,7 @@ kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text) | |||
963 | free(*string); | 963 | free(*string); |
964 | *string = NULL; | 964 | *string = NULL; |
965 | 965 | ||
966 | if ((*string = strdup(text ? text : "")) == NULL) | 966 | if (text && (*string = strdup(text)) == NULL) |
967 | return KSSL_CTX_ERR; | 967 | return KSSL_CTX_ERR; |
968 | 968 | ||
969 | return KSSL_CTX_OK; | 969 | return KSSL_CTX_OK; |