On 12/10/12 7:58 PM, Justin Ruggles wrote:
On 12/10/2012 01:27 PM, Luca Barbato wrote:
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?

Why wouldn't it be?


Just wondering, anyway it looks fine.

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to