changeset 4388:3451831c6962 libavcodec

adding assert to protect delayed_pic
author michael
date Tue, 23 Jan 2007 12:45:57 +0000
parents 05ab6e897ffd
children 3afddc65631b
files h264.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Tue Jan 23 12:04:48 2007 +0000
+++ b/h264.c	Tue Jan 23 12:45:57 2007 +0000
@@ -8341,6 +8341,9 @@
 
         pics = 0;
         while(h->delayed_pic[pics]) pics++;
+
+        assert(pics+1 < sizeof(h->delayed_pic) / sizeof(h->delayed_pic[0]));
+
         h->delayed_pic[pics++] = cur;
         if(cur->reference == 0)
             cur->reference = 1;