[FFmpeg-soc] [PATCH] AACENC: Prevent null dereference

Kostya kostya.shishkov at gmail.com
Thu May 21 07:57:10 CEST 2009


On Wed, May 20, 2009 at 09:08:55PM -0400, Alex Converse wrote:
> Prevent a null dereference in ff_psy_preprocess_end()
> 
> --Alex

> diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
> index a04cc39..be9012c 100644
> --- a/libavcodec/psymodel.c
> +++ b/libavcodec/psymodel.c
> @@ -122,6 +122,7 @@ av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx)
>  {
>      int i;
>      ff_iir_filter_free_coeffs(ctx->fcoeffs);
> +    if (ctx->fstate)
>      for(i = 0; i < ctx->avctx->channels; i++){
>          ff_iir_filter_free_state(ctx->fstate[i]);
>      }

ok


More information about the FFmpeg-soc mailing list