commit a86e6f8c7c9a3aebb894dc047545c8902e850e71 Author: Oswald Buddenhagen <o...@users.sf.net> Date: Wed Apr 14 16:52:31 2021 +0200
don't crash on malformed CAPABILITY responses amends 95a83c822. this problem was found by Lukas Braun <ko...@moshbit.net> using a fuzzer. src/drv_imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index d4fcc1f..edae95c 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -1273,7 +1273,7 @@ parse_response_code( imap_store_t *ctx, imap_cmd_t *cmd, char *s ) return RESP_CANCEL; } } else if (!strcmp( "CAPABILITY", arg )) { - if (!(p = strchr( s, ']' ))) { + if (!s || !(p = strchr( s, ']' ))) { error( "IMAP error: malformed CAPABILITY status\n" ); return RESP_CANCEL; } _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel