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

2019-05-14 Thread Gyan



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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-05-14 Thread Timo Rothenpieler

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);

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



Timo



smime.p7s
Description: S/MIME Cryptographic Signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-05-12 Thread Gyan



On 13-05-2019 06:54 AM, myp...@gmail.com wrote:

On Mon, May 13, 2019 at 4:06 AM Gyan  wrote:



On 10-05-2019 07:25 PM, 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.

Ping.

Tested and verified, LGTM, Thanks

Pushed as 87db1ca632bfbb66329c5729301d88ca30bed9b3

Thanks,
Gyan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-05-12 Thread myp...@gmail.com
On Mon, May 13, 2019 at 4:06 AM Gyan  wrote:
>
>
>
> On 10-05-2019 07:25 PM, 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.
>
> Ping.
Tested and verified, LGTM, Thanks
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-05-12 Thread Gyan



On 10-05-2019 07:25 PM, 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.


Ping.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".