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

Michael Niedermayer michaelni
Tue Jan 16 17:06:42 CET 2007


On Tue, Jan 16, 2007 at 04:00:53PM +0100, Reimar Doeffinger wrote:
> 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).

iam more in favor of print error + return -1; 
if pred_order > s->blocksize >> rice_order

and spec says:
Encoded residual. The number of samples (n) in the partition is determined as follows:

* if the partition order is zero, n = frame's blocksize - predictor order 
* else if this is not the first partition of the subframe, n = (frame's blocksize / (2^partition order)) 
* else n = (frame's blocksize / (2^partition order)) - predictor order

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070116/2519d1ae/attachment.pgp>

More information about the ffmpeg-devel mailing list