[Asterisk-code-review] app voicemail/IMAP: IMAP access FATAL error: Out of memory (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Thu Apr 7 14:36:26 CDT 2016


Hello Anonymous Coward #1000019, Joshua Colp,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/2545

to look at the new patch set (#3).

Change subject: app_voicemail/IMAP: IMAP access FATAL error: Out of memory
......................................................................

app_voicemail/IMAP: IMAP access FATAL error: Out of memory

Sometimes uw-imap function 'mail_fetchbody' returns huge len
which then pass to uw-imap function 'rfc822_base64'.
uw-imap tries to allocate huge memory and abort() on fail.

This patch check the len.
If the len more than max size (128 Mbytes) log error.
This patch also set variables len, newlen to avoid uninizialezed len.
This patch also check pointer returned by rfc822_base64.

ASTERISK-25899

Change-Id: I4a0e7d655f11abef6a5224e2169df6d5c1f1caca
---
M apps/app_voicemail.c
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/45/2545/3
-- 
To view, visit https://gerrit.asterisk.org/2545
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4a0e7d655f11abef6a5224e2169df6d5c1f1caca
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list