[FFmpeg-devel] [PATCH 15/30] avcodec/ivi: Fix segfault on allocation error

Paul B Mahol onemda at gmail.com
Tue Sep 15 19:52:19 EEST 2020


On Tue, Sep 15, 2020 at 09:39:45AM +0200, Andreas Rheinhardt wrote:
> If allocating the tiles array for indeo 4/5 fails, the context is in an
> inconsistent state, because the counter for the number of tiles is > 0.
> This will lead to a segfault when freeing the tiles' substructures.
> Fix this by setting the number of tiles to zero if the allocation was
> unsuccessfull.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavcodec/ivi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

looks ok


More information about the ffmpeg-devel mailing list