aboutsummaryrefslogtreecommitdiffstats
path: root/dsp.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-19 18:52:56 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-19 18:52:56 +0000
commitb9e359a6be75c235ac4c17b48aba496c1a177ff4 (patch)
tree731d7778d6581ea05726f21209826ae0b37a99b3 /dsp.c
parentb36d3be67c8f6ce794e809876f3cfce5e0a4590f (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-xdsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dsp.c b/dsp.c
index 5d61ff808..e637aa65b 100755
--- a/dsp.c
+++ b/dsp.c
@@ -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++)