Browse Source

avoid array underflow in IMAP LIST .lock workaround

suggested by Mark Wielaard <mark@klomp.org>.

fwiw, the workaround really is still necessary with panda imap ...
wip/maildir-uid-dupes-test
Oswald Buddenhagen 11 years ago
parent
commit
4fa5779193
  1. 2
      src/drv_imap.c

2
src/drv_imap.c

@ -1094,7 +1094,7 @@ parse_list_rsp_p2( imap_store_t *ctx, list_t *list, char *cmd ATTR_UNUSED )
goto skip;
}
}
if (!memcmp( arg + strlen( arg ) - 5, ".lock", 5 )) /* workaround broken servers */
if ((l = strlen( arg )) >= 5 && !memcmp( arg + l - 5, ".lock", 5 )) /* workaround broken servers */
goto skip;
if (map_name( arg, (char **)&narg, offsetof(string_list_t, string), ctx->delimiter, "/") < 0) {
warn( "IMAP warning: ignoring mailbox %s (reserved character '/' in name)\n", arg );

Loading…
Cancel
Save