ffmpeg | branch: release/3.2 | James Almer <[email protected]> | Sun Sep 22 23:55:49 2019 -0300| [7df1cb3dce1e8cac2021b6773d9ab8ed511cd7ce] | committer: James Almer
avcodec/bsf: check that AVBSFInternal was allocated before dereferencing it This can happen when av_bsf_free() is called on av_bsf_alloc() failure. Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: James Almer <[email protected]> (cherry picked from commit d889ae33962e4ad2b24175418fe89d72ce712179) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7df1cb3dce1e8cac2021b6773d9ab8ed511cd7ce --- libavcodec/bsf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index ac2024b8db..bfcf4af4d0 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -48,7 +48,8 @@ void av_bsf_free(AVBSFContext **pctx) av_opt_free(ctx); - av_packet_free(&ctx->internal->buffer_pkt); + if (ctx->internal) + av_packet_free(&ctx->internal->buffer_pkt); av_freep(&ctx->internal); av_freep(&ctx->priv_data); _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
