From: Brian West Date: Thu, 10 Dec 2009 00:43:33 +0000 (+0000) Subject: fix out opf bounds err X-Git-Tag: v1.0.6~1094 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff196446a532d325914378a8bc0de38b05a01c3d;p=thirdparty%2Ffreeswitch.git fix out opf bounds err git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15863 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 73e8f0fcff..268b7ef7d5 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -1437,7 +1437,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(const switch_codec_impleme found: - if (!lock) lock = array[i-1]->microseconds_per_packet; + if (!lock && i > 0) lock = array[i-1]->microseconds_per_packet; if (i > arraylen) { break; @@ -1534,7 +1534,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_ found: - if (!lock) { + if (!lock && i > 0) { lock = array[i-1]->microseconds_per_packet; }