[Ffmpeg-cvslog] r7595 - trunk/libavcodec/flac.c

reimar subversion
Sun Jan 21 10:55:28 CET 2007


Author: reimar
Date: Sun Jan 21 10:55:28 2007
New Revision: 7595

Modified:
   trunk/libavcodec/flac.c

Log:
Fix crash when pred_order greater s->blocksize >> rice_order.
Fixes http://sam.zoy.org/zzuf/lol-mplayer.flac


Modified: trunk/libavcodec/flac.c
==============================================================================
--- trunk/libavcodec/flac.c	(original)
+++ trunk/libavcodec/flac.c	Sun Jan 21 10:55:28 2007
@@ -225,6 +225,10 @@
     rice_order = get_bits(&s->gb, 4);
 
     samples= s->blocksize >> rice_order;
+    if (pred_order > samples) {
+        av_log(s->avctx, AV_LOG_ERROR, "invalid predictor order: %i > %i\n", pred_order, samples);
+        return -1;
+    }
 
     sample=
     i= pred_order;




More information about the ffmpeg-cvslog mailing list