rtpdec: Fix the minimum packet length for RTCP SR packets
authorJohn Brooks <john.brooks@bluecherry.net>
Wed, 12 Oct 2011 08:06:26 +0000 (11:06 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 12 Oct 2011 11:37:39 +0000 (14:37 +0300)
We actually read 20 bytes of these packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec.c

index 37122600a59533be67923629b90bdaf7254598c6..07f4cc35c532926d09b8047ef7dc47594f326122 100644 (file)
@@ -115,7 +115,7 @@ static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int l
     while (len >= 2) {
         switch (buf[1]) {
         case RTCP_SR:
-            if (len < 16) {
+            if (len < 20) {
                 av_log(NULL, AV_LOG_ERROR, "Invalid length for RTCP SR packet\n");
                 return AVERROR_INVALIDDATA;
             }