]> granicus.if.org Git - neomutt/commit
Remove redundant mbox delimiter check in imap_browse(). (closes #3646)
authorKevin McCarthy <kevin@8t8.us>
Sat, 21 Nov 2015 23:28:57 +0000 (15:28 -0800)
committerKevin McCarthy <kevin@8t8.us>
Sat, 21 Nov 2015 23:28:57 +0000 (15:28 -0800)
commitc20d0d3babe8d3b161113a39cfe5fab28c1c64f1
treea372b5cf17ff10bbd1b4bd6fa2bb89f1ba872a20
parent17846f2a37be2f5762de9f3fce6fd3431bbb3ea8
Remove redundant mbox delimiter check in imap_browse().  (closes #3646)

imap_fix_path() removes duplicate and trailing delimiters, so the check
below it was redundant.  This also made it appear list.delim could be
used uninitialized.

Remove the check, but add a check to make sure the "fixed" path has
len>0, to prevent oob accesses of mbox[n-1] below.

Lastly, remove a redundant n=strlen(mbox) inside the initial LIST
processing loop.  The mbox isn't changed from above, so there is no
need to rerun strlen.
imap/browse.c