[Freeswitch-svn] [commit] r10741 - freeswitch/trunk/libs/libteletone/src
FreeSWITCH SVN
mikej at freeswitch.org
Fri Dec 12 11:45:34 PST 2008
Author: mikej
Date: Fri Dec 12 14:45:34 2008
New Revision: 10741
Log:
LBTEL-1 Build error "array subscript is above array bounds"
Modified:
freeswitch/trunk/libs/libteletone/src/libteletone_generate.c
Modified: freeswitch/trunk/libs/libteletone/src/libteletone_generate.c
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_generate.c (original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_generate.c Fri Dec 12 14:45:34 2008
@@ -221,7 +221,7 @@
wait = (ts->tmp_wait > -1) ? ts->tmp_wait : ts->wait;
if (map->freqs[0] > 0) {
- for (freqlen = 0; map->freqs[freqlen] && freqlen < TELETONE_MAX_TONES; freqlen++) {
+ for (freqlen = 0; freqlen < TELETONE_MAX_TONES && map->freqs[freqlen]; freqlen++) {
teletone_dds_state_set_tone(&tones[freqlen], map->freqs[freqlen], ts->rate, 0);
teletone_dds_state_set_tx_level(&tones[freqlen], vol);
}
@@ -243,7 +243,7 @@
if (nvol <= TELETONE_VOL_DB_MAX && nvol >= TELETONE_VOL_DB_MIN) {
vol = nvol;
- for (j = 0; map->freqs[j] && j < TELETONE_MAX_TONES; j++) {
+ for (j = 0; j < TELETONE_MAX_TONES && map->freqs[j]; j++) {
teletone_dds_state_set_tx_level(&tones[j], vol);
}
dc = 0;
More information about the Freeswitch-svn
mailing list