diff options
author | Mark Spencer <markster@digium.com> | 2004-08-19 18:52:56 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-08-19 18:52:56 +0000 |
commit | 3ca96a1317e7e1d74f81944b97bbd6fe78d470e6 (patch) | |
tree | 731d7778d6581ea05726f21209826ae0b37a99b3 | |
parent | 3bcff2d2f903a8aef888195d94ee837a8232cdce (diff) |
Fix divide by zero (bugs #2268 and 2259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | dsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1228,6 +1228,9 @@ static int __ast_dsp_silence(struct ast_dsp *dsp, short *s, int len, int *totals int accum; int x; int res = 0; + + if (!len) + return 0; accum = 0; for (x=0;x<len; x++) |