diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-04-24 17:13:12 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-04-24 17:13:12 +0000 |
commit | d4ca30499ecf346022168a7e523597a08924ca12 (patch) | |
tree | 0822cb14a38fb3b09d99f35b6068afc8ec4451d8 | |
parent | 3808ebd2dffe7223358da50bfc02e609ca96ee01 (diff) |
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.
-rw-r--r-- | lib/libssl/src/ssl/kssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/ssl/kssl.c b/lib/libssl/src/ssl/kssl.c index 9e71eed9fac..b04c83e17fe 100644 --- a/lib/libssl/src/ssl/kssl.c +++ b/lib/libssl/src/ssl/kssl.c @@ -963,7 +963,7 @@ kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text) free(*string); *string = NULL; - if ((*string = strdup(text ? text : "")) == NULL) + if (text && (*string = strdup(text)) == NULL) return KSSL_CTX_ERR; return KSSL_CTX_OK; |