[FFmpeg-devel] [PATCH] avcodec/rv10: check size of s->mb_width * s->mb_height
michaelni at gmx.at
Tue Mar 3 13:17:07 CET 2015
On Mon, Mar 02, 2015 at 08:32:23PM +0100, Andreas Cadhalpun wrote:
> On 02.03.2015 19:37, Michael Niedermayer wrote:
> >On Mon, Mar 02, 2015 at 07:18:10PM +0100, Andreas Cadhalpun wrote:
> >>So would you prefer using avpriv_report_missing_feature, returning
> >>an error and checking the return value in
> >if you dont have easy access to the real networks binary decoder
> >and noone else can check it either then failing with
> >avpriv_report_missing_feature, might be safer
> OK, attached is a patch for this.
> Best regards,
> mpegvideo.h | 2 +-
> mpegvideo_enc.c | 7 +++++--
> rv10enc.c | 7 ++++++-
> 3 files changed, 12 insertions(+), 4 deletions(-)
> 1b5198d3bc1c5fca0241924ae60abe64c040bdaf 0001-avcodec-rv10-check-size-of-s-mb_width-s-mb_height.patch
> From 6fcb28f8c94b34d7169d3710f0cc3aef2b634b3b Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> Date: Mon, 2 Mar 2015 20:27:26 +0100
> Subject: [PATCH] avcodec/rv10: check size of s->mb_width * s->mb_height
> If it doesn't fit into 12 bits it triggers an assertion.
btw, it seems the real player (on linux) does not play
these old files, not even files which originated from reals own
encoder long ago
also i suspect that more than 4096 MBs would break the 64k limit as
well in reality so fixing this requires more things
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel