From: Mark Spencer Date: Thu, 9 Sep 2004 02:33:14 +0000 (+0000) Subject: Make sure rtp->f.data is initialized properly for 3389 (asterisk dev mailing list) X-Git-Tag: 1.0.0~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14e1fe47952946b5778436da3173bd4f3db88385;p=thirdparty%2Fasterisk.git Make sure rtp->f.data is initialized properly for 3389 (asterisk dev mailing list) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3751 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/rtp.c b/rtp.c index 37027ecd7f..41f1aef6b7 100755 --- a/rtp.c +++ b/rtp.c @@ -293,9 +293,13 @@ static struct ast_frame *process_rfc3389(struct ast_rtp *rtp, unsigned char *dat if (!len) return NULL; if (len < 24) { + rtp->f.data = rtp->rawdata + AST_FRIENDLY_OFFSET; rtp->f.datalen = len - 1; + rtp->f.offset = AST_FRIENDLY_OFFSET; memcpy(rtp->f.data, data + 1, len - 1); } else { + rtp->f.data = NULL; + rtp->f.offset = 0; rtp->f.datalen = 0; } rtp->f.frametype = AST_FRAME_CNG;