[FFmpeg-devel] [PATCH] avfilter/drawtext: make command processing error-resilient

Gyan ffmpeg at gyani.pro
Tue May 14 13:58:57 EEST 2019



On 14-05-2019 02:03 PM, Timo Rothenpieler wrote:
> On 10/05/2019 15:55, Gyan wrote:
>> At present, if the command args passed to drawtext contain any 
>> invalid values, ffmpeg may crash or, at best, stop drawing any text.
>> Attached patch gets the filter to continue with existing parameters, 
>> if not all of the changes can be parsed or applied. This allows users 
>> in live processing to correct and resubmit.
>>
>> Gyan
>
> This patch has at least two mis-uses of av_freep(), which potentially 
> lead to a crash.
>
>> +        av_freep(old);
>> +
>> +        ctx->priv = new;
>
> Should probably be av_freep(&old);
>
>> +fail:
>> +    av_log(ctx, AV_LOG_ERROR, "Failed to process command. Continuing 
>> with existing parameters.\n");
>> +    av_freep(new);
>> +    return ret;
>
> Should probably be av_freep(&new);
>
Will push these soon.

> I did not do a full review of the patch, just pointing out those 
> issues Coverity found. See coverity CID 1445099.

Requested Coverity access via Synopsys.

Gyan


More information about the ffmpeg-devel mailing list