[FFmpeg-devel] [PATCH 5/7] ffmpeg: dynamically allocate stream_maps

Michael Niedermayer michaelni
Wed Aug 18 22:57:41 CEST 2010


On Fri, Aug 13, 2010 at 08:24:18PM +0200, Aur?lien Jacobs wrote:
> From: Aurelien Jacobs <aurel at gnuage.org>
> 
> ---
>  ffmpeg.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index dcaaecf..9e55f01 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -117,8 +117,8 @@ static AVCodec **output_codecs = NULL;
>  static int nb_output_files = 0;
>  static int nb_output_codecs = 0;
>  
> -static AVStreamMap stream_maps[MAX_FILES*MAX_STREAMS];
> -static int nb_stream_maps;
> +static AVStreamMap *stream_maps = NULL;

> +static int nb_stream_maps = 0;

unneeded

also are you sure that this and the other patches arent full of exploitable
bugs?
previously the arrays where as large as any access could be because there
was a global hard limit ...

have you checked that all accesses to the arrays are safe?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100818/2b59f696/attachment.pgp>



More information about the ffmpeg-devel mailing list