On 12/10/2012 06:50 PM, Justin Ruggles wrote:
> Avoids trying to read a packet with 0 or negative size.
> Avoids a potential infinite loop due to seeking backwards.
> if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id ==
> ch_id) {
> frame = avio_rl16(pb);
> - if ((res = av_get_packet(pb, pkt, len-2)) < 0)
> + len -= 2;
> + if (len <= 0)
> + goto skip;
> + len -= 4;
> + if (len <= 0)
> + if (len <= 0)
> + goto skip;
1-sized is a valid?
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel