aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-27 20:57:55 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-27 20:57:55 +0000
commit21cb71a960038e967704e25d39ad9bb31c75ee5a (patch)
tree7fb84dff07705907e5969dbaf63a6b09c1f9b0ae
parent241bc934ebd8fd306125821d11a59b2b4cb6e7a3 (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/branches/1.6.1@209237 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 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;