[FFmpeg-devel] [PATCH] Check for buffer overflow in ADX decoder

Michael Niedermayer michaelni
Sun Sep 23 21:53:23 CEST 2007


Hi

On Sat, Sep 22, 2007 at 08:37:04AM +0300, Kostya wrote:
> $subj

> Index: libavcodec/adx.c
> ===================================================================
> --- libavcodec/adx.c	(revision 10505)
> +++ libavcodec/adx.c	(working copy)
> @@ -328,6 +328,11 @@
>          rest -= hdrsize;
>      }
>  
> +    /* 18 bytes of data are expanded into 32*2 bytes of audio,
> +       so guard against buffer overflows */
> +    if(rest/18 > *data_size/64)
> +        rest = (*data_size/64) * 18;

ok

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070923/4514fc26/attachment.pgp>



More information about the ffmpeg-devel mailing list