]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 209235 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Mon, 27 Jul 2009 20:57:55 +0000 (20:57 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 27 Jul 2009 20:57:55 +0000 (20:57 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@209237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 8a51050b91a132e49362d9a9d10f0ef3d94bd60b..bb73d253fcfd117a11ba256286f7ab7502ce34e4 100644 (file)
@@ -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;