]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_voicemail: Fix test_voicemail_notify_endl test. 75/2575/1
authorJoshua Colp <jcolp@digium.com>
Tue, 12 Apr 2016 14:10:45 +0000 (11:10 -0300)
committerJoshua Colp <jcolp@digium.com>
Tue, 12 Apr 2016 14:11:59 +0000 (11:11 -0300)
commit1dc00f50772d280e2dd4e46e3bb42e9c44fb5a03
tree1206ddcab4699592a87dfc0cc8a81cc1aa3650b7
parent1335aaa5791c8542bc0a8f9540ab8752adac03f5
app_voicemail: Fix test_voicemail_notify_endl test.

The test_voicemail_notify_endl test checks the end-of-line
characters of an email message to confirm that they are consistent.
The test wrongfully assumed that reading from the email message
into a buffer will always result in more than 1 character being
read. This is incorrect. If only 1 character was read the test
would go outside of the buffer and access other memory causing
a crash.

The test now checks to ensure that 2 or more characters are read
in ensuring the test stays within the buffer.

ASTERISK-25874 #close

Change-Id: Ic2c89cea6e90f2c0bc2d8138306ebbffd4f8b710
apps/app_voicemail.c