1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt 7cfa8e1910 avcodec/svq3: Fix segfault on allocation error, avoid allocations
The very first thing the SVQ3 decoder currently does is allocating several
SVQ3Frames, a structure which contains members that need to be freed on
their own. If one of these allocations fails, the decoder calls its own
close function to not leak the already allocated SVQ3Frames. Yet said
function presumes that the SVQ3Frames have been successfully allocated
as there is no check before freeing the members that need to be freed.

This commit fixes this by making these frames part of the SVQ3Context,
thereby avoiding the allocations altogether. Notice that the pointers
to the frames have been retained in order to allow to just swap them as
the code already does.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 96061c5a4f690c3ab49e4458701bb013fd3dd57f)
2021-02-27 07:20:57 +01:00
..
2020-05-27 22:13:39 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-30 18:02:55 +02:00
2020-05-30 18:02:55 +02:00
2021-02-02 14:18:21 +01:00
2020-06-05 18:14:17 +02:00
2020-06-14 22:02:34 +02:00
2021-02-02 14:18:21 +01:00
2021-02-20 14:21:24 +01:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-06-14 22:02:34 +02:00
2020-06-08 20:45:56 +02:00
2020-05-30 18:02:55 +02:00
2020-07-09 12:35:39 +02:00
2021-02-02 14:18:20 +01:00
2021-02-02 14:18:20 +01:00
2021-02-02 14:18:20 +01:00
2020-06-08 01:22:34 +02:00