FS-8169 #resolve [uuid_displace on stereo channels can lead to memory corruption causing a crash]

This commit is contained in:
Anthony Minessale 2015-09-15 22:19:12 -05:00
parent 703795e913
commit 359c0cbcaa
1 changed files with 1 additions and 1 deletions

View File

@ -770,7 +770,7 @@ static switch_bool_t write_displace_callback(switch_media_bug_t *bug, void *user
} else {
st = switch_core_file_read(&dh->fh, rframe->data, &len);
if (len < rframe->samples) {
memset((char *)rframe->data + len * 2 * dh->fh.channels, 0, (rframe->datalen - len) * 2 * dh->fh.channels);
memset((char *)rframe->data + (len * 2 * dh->fh.channels), 0, (rframe->samples - len) * 2 * dh->fh.channels);
}
}