[FFmpeg-cvslog] Avoid a null pointer dereference on oom in the aac encoder.

Carl Eugen Hoyos git at videolan.org
Mon Jul 1 00:26:36 CEST 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Jun 30 23:25:18 2013 +0200| [f4aa8085f23c3abff3114d7bf638698d42110526] | committer: Carl Eugen Hoyos

Avoid a null pointer dereference on oom in the aac encoder.

Fixes ticket #2732.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4aa8085f23c3abff3114d7bf638698d42110526
---

 libavcodec/psymodel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
index ea11636..bfc85b3 100644
--- a/libavcodec/psymodel.c
+++ b/libavcodec/psymodel.c
@@ -75,7 +75,7 @@ FFPsyChannelGroup *ff_psy_find_group(FFPsyContext *ctx, int channel)
 
 av_cold void ff_psy_end(FFPsyContext *ctx)
 {
-    if (ctx->model->end)
+    if (ctx->model && ctx->model->end)
         ctx->model->end(ctx);
     av_freep(&ctx->bands);
     av_freep(&ctx->num_bands);



More information about the ffmpeg-cvslog mailing list