[FFmpeg-cvslog] rtpdec_vp9: Drop extra sanity check for size of input packet

Vittorio Giovara git at videolan.org
Wed Mar 11 20:37:37 CET 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Mar  9 17:27:22 2015 +0000| [bacc92b59bfa5d6a1f631e63e46fc1d2fb934e51] | committer: Vittorio Giovara

rtpdec_vp9: Drop extra sanity check for size of input packet

In this case len is always at least 1, since it is checked against
RTP_VP9_DESC_REQUIRED_SIZE + 1 and then it is reduced by
RTP_VP9_DESC_REQUIRED_SIZE before entering the has_pic_id check.

Bug-Id: CID 1270811

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bacc92b59bfa5d6a1f631e63e46fc1d2fb934e51
---

 libavformat/rtpdec_vp9.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavformat/rtpdec_vp9.c b/libavformat/rtpdec_vp9.c
index cae6f53..71ea480 100644
--- a/libavformat/rtpdec_vp9.c
+++ b/libavformat/rtpdec_vp9.c
@@ -113,11 +113,6 @@ static int vp9_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_vp9_ctx,
      *   PictureID:  8 or 16 bits including the M bit.
      */
     if (has_pic_id) {
-        if (len < 1) {
-            av_log(ctx, AV_LOG_ERROR, "Too short RTP/VP9 packet\n");
-            return AVERROR_INVALIDDATA;
-        }
-
         /* check for 1-byte or 2-byte picture index */
         if (buf[0] & 0x80) {
             if (len < 2) {



More information about the ffmpeg-cvslog mailing list