imap-send: handle missing response codes gracefully
commit618ec81abbda91d867ac43320c7fd3e8fcc23e78
authorRené Scharfe <l.s.r@web.de>
Thu, 2 Nov 2017 17:27:05 +0000 (2 18:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Nov 2017 13:45:57 +0000 (3 22:45 +0900)
treebd91a28d335a1694d854e4ef1852c749b0dfb25e
parentf54c5bd40c0e215fc0ba196d74b092ef3ec02273
imap-send: handle missing response codes gracefully

Response codes are optional.  Exit parse_response_code() early if it's
passed a NULL string, indicating that we reached the end of the reply.
This avoids dereferencing said NULL pointer.

Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c