[FFmpeg-devel] [PATCH] roqvideodec: Improve checking of input buffer bounds.

Michael Niedermayer michaelni at gmx.at
Sun Aug 21 15:36:19 CEST 2011


On Sat, Aug 20, 2011 at 01:14:03PM +0200, Reimar Döffinger wrote:
> Fixes trac issue #408.
> 
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
>  libavcodec/roqvideodec.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
> index 4af7ede..bbbb605 100644
> --- a/libavcodec/roqvideodec.c
> +++ b/libavcodec/roqvideodec.c
> @@ -71,9 +71,14 @@ static void roqvideo_decode_frame(RoqContext *ri)
>      }
>  
>      bpos = xpos = ypos = 0;
> +    chunk_size = FFMIN(chunk_size, buf_end - buf);

maybe a warning should be printed in case chunk_size changes

otherwise LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110821/d8903281/attachment.asc>


More information about the ffmpeg-devel mailing list