OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ed2c7b
)
imap-send: check NULL return of SSL_CTX_new()
author
Kazuki Yamaguchi
<k@rhe.jp>
Fri, 8 Apr 2016 16:22:14 +0000
(
01:22
+0900)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 8 Apr 2016 18:46:22 +0000
(11:46 -0700)
SSL_CTX_new() may fail with return value NULL.
Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c
patch
|
blob
|
history
diff --git
a/imap-send.c
b/imap-send.c
index
8bf363b
..
e964e2a
100644
(file)
--- a/
imap-send.c
+++ b/
imap-send.c
@@
-298,6
+298,10
@@
static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
}
ctx = SSL_CTX_new(meth);
+ if (!ctx) {
+ ssl_socket_perror("SSL_CTX_new");
+ return -1;
+ }
if (verify)
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);