Commit bacc92b5 authored by Vittorio Giovara's avatar 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
parent fe99c52f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment