[Ffmpeg-devel] [PATCH] flac crash when pred_order too big

Reimar Doeffinger Reimar.Doeffinger
Tue Jan 16 16:00:53 CET 2007


Hello,
attached patch fixes a crash when pred_order > s->blocksize >>
rice_order, as exposed by http://sam.zoy.org/zzuf/lol-mplayer.flac
Since I do not know the spec i have no idea if this patch is the correct
way to fix it though (though it is very simple and looks like it could
make sense).

Greetings,
Reimar Doeffinger
-------------- next part --------------
Index: libavcodec/flac.c
===================================================================
--- libavcodec/flac.c	(revision 7541)
+++ libavcodec/flac.c	(working copy)
@@ -245,7 +245,7 @@
                 s->decoded[channel][sample] = get_sr_golomb_flac(&s->gb, tmp, INT_MAX, 0);
             }
         }
-        i= 0;
+        i-= samples;
     }
 
 //    av_log(s->avctx, AV_LOG_DEBUG, "partitions: %d, samples: %d\n", 1 << rice_order, sample);



More information about the ffmpeg-devel mailing list