[Asterisk-cvs] asterisk rtp.c,1.86,1.87
markster at lists.digium.com
markster at lists.digium.com
Tue Aug 31 01:05:51 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv28856
Modified Files:
rtp.c
Log Message:
Be sure we still check for proper buffer length
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- rtp.c 31 Aug 2004 00:16:28 -0000 1.86
+++ rtp.c 31 Aug 2004 05:09:20 -0000 1.87
@@ -452,6 +452,11 @@
hdrlen += (rtpheader[3] & 0xffff) << 2;
}
+ if (res < hdrlen) {
+ ast_log(LOG_WARNING, "RTP Read too short (%d, expecting %d)\n", res, hdrlen);
+ return &null_frame;
+ }
+
#if 0
printf("Got RTP packet from %s:%d (type %d, seq %d, ts %d, len = %d)\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port), payloadtype, seqno, timestamp,res - hdrlen);
#endif
More information about the svn-commits
mailing list