aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-27 21:04:24 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-27 21:04:24 +0000
commit84c16ecb9aedaf5f3910efab6d4f424b490103b1 (patch)
tree2e71b1dccca4c026ba298c255a2afb8dde9d0b28
parent9802f4716f251599d62358f331c9768fbbd6cc76 (diff)
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/tags/1.6.1.2@209240 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/rtp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 94eab9e9f..bdebd580f 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1790,6 +1790,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;