[asterisk-bugs] [JIRA] (ASTERISK-24357) [fax] Out of bounds error in update_modem_bits
Jeremy Lainé (JIRA)
noreply at issues.asterisk.org
Fri Sep 26 02:37:28 CDT 2014
Jeremy Lainé created ASTERISK-24357:
---------------------------------------
Summary: [fax] Out of bounds error in update_modem_bits
Key: ASTERISK-24357
URL: https://issues.asterisk.org/jira/browse/ASTERISK-24357
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Resources/res_fax
Affects Versions: 11.13.0
Reporter: Jeremy Lainé
The update_modem_bits function in res_fax.c suffers from an out of bounds error : it allocates an array "m" of size 5, but can potentially write 6 entries to the array, counting the final NULL value.
As there are only 4 valid values (v17, v27, v29 and v34) for modems, the loop should stop iterating one item earlier.
Putting 5 items or more in the "modems" line of res_fax.conf crashes asterisk, for instance:
modems=v17,v27,v29,v34,v17
The attached patch fixes the problem.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list