artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ed27f3
)
obvious use after free was less obviously not a use after free.
author
tedu
<tedu@openbsd.org>
Thu, 24 Apr 2014 17:13:11 +0000
(17:13 +0000)
committer
tedu
<tedu@openbsd.org>
Thu, 24 Apr 2014 17:13:11 +0000
(17:13 +0000)
who uses '\0' as a null pointer constant? fix my mistake and restore
original semantics.
lib/libssl/src/ssl/kssl.c
patch
|
blob
|
history
diff --git
a/lib/libssl/src/ssl/kssl.c
b/lib/libssl/src/ssl/kssl.c
index
9e71eed
..
b04c83e
100644
(file)
--- 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;