app_voicemail: Fix unchecked bounds of myArray in IMAP_STORAGE.
authorWalter Doekes <walter+asterisk@wjd.nu>
Thu, 30 Oct 2014 09:21:42 +0000 (09:21 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Thu, 30 Oct 2014 09:21:42 +0000 (09:21 +0000)
commit5d8d90c402918b3425c6c4181ee8957bad3a5725
tree00fa18efc66324de612983b89590ff507be01eff
parentc866ced76be5b441c82a6c36f445390ec9934b34
app_voicemail: Fix unchecked bounds of myArray in IMAP_STORAGE.

In update_messages_by_imapuser(), messages were appended to a finite
array which resulted in a crash when an IMAP mailbox contained more
than 256 entries. This memory is now dynamically increased as needed.

Observe that this patch adds a bunch of XXX's to questionable code. See
the review (url below) for more information.

ASTERISK-24190 #close
Reported by: Nick Adams
Tested by: Nick Adams

Review: https://reviewboard.asterisk.org/r/4126/
........

Merged revisions 426691 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 426692 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 426696 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 426702 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_voicemail.c