From: Anthony Minessale Date: Wed, 27 Mar 2013 20:39:10 +0000 (-0500) Subject: FS-5229 --resolve oops, i missed the part that its subsequent calls to displace X-Git-Tag: v1.3.17-final~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4e21fd3f6eb3b11773a9588d2da2fb10b470dd2;p=thirdparty%2Ffreeswitch.git FS-5229 --resolve oops, i missed the part that its subsequent calls to displace --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 1e1e10eeaa..e2ef526af8 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -844,8 +844,9 @@ 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); - rframe->samples = (uint32_t) len; - rframe->datalen = rframe->samples * 2; + if (len < rframe->samples) { + memset(rframe->data, 0, rframe->datalen - len * 2); + } } if (st != SWITCH_STATUS_SUCCESS || len == 0) {