mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-19 22:20:36 +00:00
4558f24039
chan_iax2 has several code paths where a frame's data length is calculated by subtraction. On some paths, there is a check for negative length. One of these paths is missing this check, and on this path, it is possible for the result to be negative, leading to a crash as a result of memory operations using the bogus length. Add a check to capture this off-nominal case. This will log the appropriate warnings as in other cases and prevent a crash. Also update the log messages to be clearer. Resolves: #1707