mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
FS-8169 #resolve [uuid_displace on stereo channels can lead to memory corruption causing a crash]
This commit is contained in:
parent
703795e913
commit
359c0cbcaa
@ -770,7 +770,7 @@ static switch_bool_t write_displace_callback(switch_media_bug_t *bug, void *user
|
|||||||
} else {
|
} else {
|
||||||
st = switch_core_file_read(&dh->fh, rframe->data, &len);
|
st = switch_core_file_read(&dh->fh, rframe->data, &len);
|
||||||
if (len < rframe->samples) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user