[FFmpeg-devel] [PATCH] check for null pointer in nuv decoder (issue 2524)

Reimar Döffinger Reimar.Doeffinger
Mon Jan 10 08:30:04 CET 2011


On Sun, Jan 09, 2011 at 10:32:02PM -0500, Daniel Kang wrote:
> In decode_init in the nuv decoder, c->decomp_buf is set to NULL. In most
> cases, this is okay, as the buffer is reallocated. However, for invalid
> nuv files, ffmpeg does not reallocate the buffer. In this case, ffmpeg
> will crash when trying to access the null pointer. The patch attached
> adds a check for this.

There are other issues, but please try just setting decomp_size to 0
when allocation fails, that should be enough.



More information about the ffmpeg-devel mailing list