From 0eb399c672ab755151ee35edf3bc38fd9e8631d3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 4 Apr 2007 13:27:24 +0000 Subject: [PATCH] accept empty SEARCH IMAP responses - reasonable servers omit them alltogether, but this is allowed, too. patch by CCMAIL: Alexander Gerasiov fixes debian bug #413336 fixed in HEAD a year ago - accidentally ... --- src/drv_imap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index 21e6018..1e976f2 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -865,7 +865,9 @@ parse_search( imap_t *imap, char *cmd ) int uid; arg = next_arg( &cmd ); - if (!arg || !(uid = atoi( arg ))) { + if (!arg) + return; + if (!(uid = atoi( arg ))) { fprintf( stderr, "IMAP error: malformed SEARCH response\n" ); return; }