Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
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
raw
|
patch
| inline |
side by side
(parent:
1ed2c7b
)
diff --git
a/imap-send.c
b/imap-send.c
index 8bf363bbdf5bb50b500bf10e78f8c1c3b0e93950..e964e2a7fc9a824981d6f5f06d82d8fc11ddd00e 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);