changeset 18052:be163e9c9bca

make sure the indx chunk is big enough to hold the basic structure.
author iive
date Thu, 06 Apr 2006 21:49:12 +0000
parents 110105412f8f
children d0f651424409
files libmpdemux/aviheader.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Thu Apr 06 20:56:35 2006 +0000
+++ b/libmpdemux/aviheader.c	Thu Apr 06 21:49:12 2006 +0000
@@ -207,6 +207,9 @@
     case mmioFOURCC('i', 'n', 'd', 'x'): {
       uint32_t i;
       avisuperindex_chunk *s;
+      if(chunksize<=24){
+        break;
+      }
       priv->suidx_size++;
       priv->suidx = realloc(priv->suidx, priv->suidx_size * sizeof (avisuperindex_chunk));
       s = &priv->suidx[priv->suidx_size-1];