Author: file Date: Tue Oct 7 13:34:40 2014 New Revision: 424753 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424753 Log: data: Properly access formats in capabilities structure when adding codecs.
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 Modified: trunk/ (props changed) trunk/main/data.c Propchange: trunk/ ------------------------------------------------------------------------------ Binary property 'branch-13-merged' - no diff available. Modified: trunk/main/data.c URL: http://svnview.digium.com/svn/asterisk/trunk/main/data.c?view=diff&rev=424753&r1=424752&r2=424753 ============================================================================== --- trunk/main/data.c (original) +++ trunk/main/data.c Tue Oct 7 13:34:40 2014 @@ -3146,7 +3146,7 @@ } 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); -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
