diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-08-19 18:52:56 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-08-19 18:52:56 +0000 |
commit | b9e359a6be75c235ac4c17b48aba496c1a177ff4 (patch) | |
tree | 731d7778d6581ea05726f21209826ae0b37a99b3 /dsp.c | |
parent | b36d3be67c8f6ce794e809876f3cfce5e0a4590f (diff) |
Fix divide by zero (bugs #2268 and 2259)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3626 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'dsp.c')
-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++) |