[FFmpeg-devel] [PATCH]lavf/concatdec: Allocate the filenames on the heap

Marton Balint cus at passwd.hu
Sat Oct 21 19:22:28 EEST 2017

On Fri, 20 Oct 2017, Carl Eugen Hoyos wrote:

> Hi!
> I believe that the use-case is valid and there is definitely a bug
> because no error is shown for too long filenames.
> In addition, allocating 50k on the heap seems nicer than 4k on the stack.

50k is not much better than 4k. You should add an ff_get_line variant 
which dynamically allocates the needed buffer.

Also you should free buf somewhere eventually.

I thought filenames in libavformat are limited to 1K anyway because of the 
AVFormatContext->filename field. So if your patch really fixes the ticket, 
then how? :)


More information about the ffmpeg-devel mailing list