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)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 4 Nov 2011 00:08:54 +0000 (01:08 +0100)
We actually read 20 bytes of these packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5d6ecf5345c0913e2b66427ea062e7989201a139)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtpdec.c

index 9fc30d7..bc0aea6 100644 (file)
@@ -114,7 +114,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;
             }