don't twiddle memory that doesn't belong to us (issue #5348)
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 5 Oct 2005 00:28:04 +0000 (00:28 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 5 Oct 2005 00:28:04 +0000 (00:28 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6727 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 77a2a40..dc4f8fb 100755 (executable)
@@ -389,7 +389,7 @@ static void adjust_volume(struct ast_frame *f, int vol)
        int count;
        short *fdata = f->data;
 
-       for (count = 0; count < f->datalen; count++) {
+       for (count = 0; count < (f->datalen / sizeof(*fdata)); count++) {
                if (vol > 0) {
                        fdata[count] *= abs(vol);
                } else if (vol < 0) {