]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8169 Fixed uuid_displace on stereo channels can lead to memory corruption causing...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 16 Sep 2015 03:19:12 +0000 (22:19 -0500)
committerMichael Jerris <mike@jerris.com>
Mon, 21 Sep 2015 22:45:59 +0000 (17:45 -0500)
src/switch_ivr_async.c

index ab2568c6159554c7becccb68cf79ead2d2d5244c..966f035375cbb4ad726b9429dd47a38debca8092 100644 (file)
@@ -780,7 +780,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);
                                }
                        }