Re: [FFmpeg-devel] [PATCH] avcodec/bsf: set pctx to NULL when av_bsf_alloc failed

2021-01-16 Thread Steven Liu
> 在 2021年1月16日,21:19,James Almer 写道: > > On 1/16/2021 2:24 AM, Steven Liu wrote: >> av_bsf_free will free invalid pointer when av_bsf_alloc failed. >> because av_bsf_list_parse_str called av_bsf_get_null_filter, >> av_bsf_get_null_filter called av_bsf_alloc, and av_bsf_alloc >> should set a val

Re: [FFmpeg-devel] [PATCH] avcodec/bsf: set pctx to NULL when av_bsf_alloc failed

2021-01-16 Thread James Almer
On 1/16/2021 2:24 AM, Steven Liu wrote: av_bsf_free will free invalid pointer when av_bsf_alloc failed. because av_bsf_list_parse_str called av_bsf_get_null_filter, av_bsf_get_null_filter called av_bsf_alloc, and av_bsf_alloc should set a value to the *pctx before return success or failed, becaus

[FFmpeg-devel] [PATCH] avcodec/bsf: set pctx to NULL when av_bsf_alloc failed

2021-01-15 Thread Steven Liu
av_bsf_free will free invalid pointer when av_bsf_alloc failed. because av_bsf_list_parse_str called av_bsf_get_null_filter, av_bsf_get_null_filter called av_bsf_alloc, and av_bsf_alloc should set a value to the *pctx before return success or failed, because it dose not initial a null pointer ever,