From 21cb71a960038e967704e25d39ad9bb31c75ee5a Mon Sep 17 00:00:00 2001 From: mmichelson Date: Mon, 27 Jul 2009 20:57:55 +0000 Subject: Merged revisions 209235 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r209235 | mmichelson | 2009-07-27 15:54:54 -0500 (Mon, 27 Jul 2009) | 5 lines Gracefully handle malformed RTP text packets. AST-2009-004 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@209237 f38db490-d61c-443f-a65b-d21fe96a405b --- main/rtp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main/rtp.c') diff --git a/main/rtp.c b/main/rtp.c index 8a51050b9..bb73d253f 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -1840,6 +1840,9 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) rtp->f.subclass = AST_FORMAT_T140; header_end = memchr(data, ((*data) & 0x7f), rtp->f.datalen); + if (header_end == NULL) { + return &ast_null_frame; + } header_end++; header_length = header_end - data; -- cgit v1.2.3