Formats within a capabilities structure are addressed starting at 0, not 1.
Assuming 1 causes it to exceed an array.
ASTERISK-24389 #close
Reported by: Kevin Harwell
........
Merged revisions 424752 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424753
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
}
count = ast_format_cap_count(cap);
- for (i = 1; i <= count; ++i) {
+ for (i = 0; i < count; ++i) {
struct ast_format *fmt;
fmt = ast_format_cap_get_format(cap, i);