projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df09088
)
avoid possible NULL dereference caused by my previous fix
author
Daniel Stenberg
<daniel@haxx.se>
Mon, 3 Aug 2009 14:07:57 +0000
(14:07 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 3 Aug 2009 14:07:57 +0000
(14:07 +0000)
lib/ssluse.c
patch
|
blob
|
history
diff --git
a/lib/ssluse.c
b/lib/ssluse.c
index
0b98ba0
..
07824b4
100644
(file)
--- a/
lib/ssluse.c
+++ b/
lib/ssluse.c
@@
-1178,7
+1178,7
@@
static CURLcode verifyhost(struct connectdata *conn,
else /* not a UTF8 name */
j = ASN1_STRING_to_UTF8(&peer_CN, tmp);
- if(
(int)strlen((char *)peer_CN) != j
) {
+ if(
peer_CN && ((int)strlen((char *)peer_CN) != j)
) {
/* there was a terminating zero before the end of string, this
cannot match and we return failure! */
failf(data, "SSL: illegal cert name field");