From 8c86f34bf0e23c719bdbe69714a48536eb26597c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sun, 14 Feb 2021 23:06:24 +0100 Subject: [PATCH] fix bogus continuation of IMAP list parsing on error, parse_imap_list() needs to reset the nesting level in the state, as imap_socket_read() uses that as an indicator whether list parsing is ongoing. --- src/drv_imap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drv_imap.c b/src/drv_imap.c index c270031..2ade80e 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -924,6 +924,7 @@ parse_imap_list( imap_store_t *ctx, char **sp, parse_list_state_t *sts ) } bail: free_list( sts->head ); + sts->level = 0; return LIST_BAD; }