From f80530692b7dc6607df74b643353a162efbb61f5 Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 9 Sep 2004 02:33:14 +0000 Subject: Make sure rtp->f.data is initialized properly for 3389 (asterisk dev mailing list) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3751 f38db490-d61c-443f-a65b-d21fe96a405b --- rtp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rtp.c') diff --git a/rtp.c b/rtp.c index 37027ecd7..41f1aef6b 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; -- cgit v1.2.3