On Tue, Apr 20, 2021 at 06:26:49PM +0200, Andreas Rheinhardt wrote:
> Before 9b3c46a081a9f01559082bf7a154fc6be1e06c18 every call to
> ff_jpegls_decode_picture() allocated and freed a JLSState. This commit
> instead put said structure into the context of the JPEG-LS decoder to
> avoid said allocation. But said function can also be called from other
> MJPEG-based decoders and their contexts doesn't contain said structure,
> leading to segfaults. This commit fixes this: The JLSState is now
> allocated on the first call to ff_jpegls_decode_picture() and stored in
> the context.
> 
> Found-by: Michael Niedermayer <mich...@niedermayer.cc>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
> ---
>  libavcodec/jpeglsdec.c | 15 ++++++++-------
>  libavcodec/mjpegdec.c  |  1 +
>  libavcodec/mjpegdec.h  |  3 +++
>  3 files changed, 12 insertions(+), 7 deletions(-)

LGTM

thx

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

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to