aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-22 17:47:13 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-22 17:47:13 +0000
commit1209717ab0587ee40a71ab55ccc393bda42806d7 (patch)
tree96469c8840efa5f0a5aa3c28e32f4dbaf4d774d6 /channel.c
parent26064a0523e77570c30c55eec4cc0bfab6e45fba (diff)
fix MixMonitor crash (issue #6321, probably others)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@8437 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 777432940..56d06978d 100644
--- a/channel.c
+++ b/channel.c
@@ -3830,7 +3830,7 @@ static void copy_data_from_queue(struct ast_channel_spy_queue *queue, short *buf
}
tocopy = (f->samples > samples) ? samples : f->samples;
- bytestocopy = ast_codec_get_len(queue->format, samples);
+ bytestocopy = ast_codec_get_len(queue->format, tocopy);
memcpy(buf, f->data, bytestocopy);
samples -= tocopy;
buf += tocopy;