Author: file
Date: Tue Oct  7 13:33:45 2014
New Revision: 424752

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424752
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

Modified:
    branches/13/main/data.c

Modified: branches/13/main/data.c
URL: 
http://svnview.digium.com/svn/asterisk/branches/13/main/data.c?view=diff&rev=424752&r1=424751&r2=424752
==============================================================================
--- branches/13/main/data.c (original)
+++ branches/13/main/data.c Tue Oct  7 13:33:45 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

Reply via email to