[Ffmpeg-devel] [PATCH] check with MAX_FILES in case buffer overflow

Benoit Fouet benoit.fouet
Mon Feb 26 12:37:17 CET 2007


Limin Wang wrote:
> Hi,
>
> The patch try to fix the buffer overflow in case more than MAX_FILES input
> files/output files/stream maps/meta maps. Please review it.
>
> Thanks,
> Limin
>   
> ------------------------------------------------------------------------
>
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(revision 8129)
> +++ ffmpeg.c	(working copy)
> @@ -2465,6 +2465,12 @@
>      AVStreamMap *m;
>      const char *p;
>  
> +    if( nb_stream_maps >= MAX_FILES ) {
> +        fprintf(stderr, "The number of stream maps could not > %d \n",
> +                MAX_FILES);
> +        exit(1);
> +    }
> +
>   
maybe you could just write: "The number of stream maps could not exceed
%d\n" instead :)

Ben





More information about the ffmpeg-devel mailing list