ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Thu Mar 18 22:20:03 2021 +0100| [28859d6e7cdbf0cc230cbf782f3895a9fa22616c] | committer: Michael Niedermayer
avcodec/aacpsy: Check model_priv_data before dereferencing in psy_3gpp_end() Fixes: null pointer dereference Fixes: av_freep.mp4 Found-by: Rafael Dutra <[email protected]> Tested-by: Rafael Dutra <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28859d6e7cdbf0cc230cbf782f3895a9fa22616c --- libavcodec/aacpsy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index fca692cb15..482113d427 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -855,7 +855,8 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, static av_cold void psy_3gpp_end(FFPsyContext *apc) { AacPsyContext *pctx = (AacPsyContext*) apc->model_priv_data; - av_freep(&pctx->ch); + if (pctx) + av_freep(&pctx->ch); av_freep(&apc->model_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".
