[FFmpeg-devel] [PATCH 1/2] avcodec/pgssubdec: Free subtitle on error
Paul B Mahol
onemda at gmail.com
Sun Jan 5 09:44:50 EET 2020
lgtm
On 1/5/20, Michael Niedermayer <michael at niedermayer.cc> wrote:
> Fixes: Assertion failure
> Fixes:
> 19753/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGSSUB_fuzzer-5688461843759104
>
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/pgssubdec.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
> index 8c10f6d573..7fadcb8b4b 100644
> --- a/libavcodec/pgssubdec.c
> +++ b/libavcodec/pgssubdec.c
> @@ -691,8 +691,11 @@ static int decode(AVCodecContext *avctx, void *data,
> int *data_size,
> ret = AVERROR_INVALIDDATA;
> break;
> }
> - if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
> + if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) {
> + avsubtitle_free(data);
> + *data_size = 0;
> return ret;
> + }
>
> buf += segment_length;
> }
> --
> 2.24.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list