[FFmpeg-devel] [PATCH] avcodec/mjpegenc: Fix segfault when freeing incomplete context

Michael Niedermayer michael at niedermayer.cc
Wed Mar 31 15:27:31 EEST 2021


On Wed, Mar 31, 2021 at 12:26:24AM +0200, Andreas Rheinhardt wrote:
> When allocating the MJpegContext fails (or if the dimensions run afoul
> of the 65500x65500 limit), an attempt to free a subbuffer of said
> context leads to a segfault in ff_mjpeg_encode_close().
> Seems to be a regression since 467d9e27e0cb2bf74f41dc832f2f8d191ba58ec9.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/mjpegenc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

LGTM

thx

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

Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210331/fefa7636/attachment.sig>


More information about the ffmpeg-devel mailing list