mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 10:51:40 +00:00
don't twiddle memory that doesn't belong to us (issue #5348)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user