diff mbox

[FFmpeg-devel,4/5] CodeAi generated fix for CWE 561 Dead Code

Message ID 1520376143-5925-5-git-send-email-benjamin.bales@assrc.us
State Superseded
Headers show

Commit Message

C0deAi March 6, 2018, 10:42 p.m. UTC
Signed-off-by: C0deAi <benjamin.bales@assrc.us>
---
 libavcodec/h264_metadata_bsf.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Mark Thompson March 6, 2018, 11:49 p.m. UTC | #1
On 06/03/18 22:42, C0deAi wrote:
> Signed-off-by: C0deAi <benjamin.bales@assrc.us>
> ---
>  libavcodec/h264_metadata_bsf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
> index 89bdedf..09b3f1a 100644
> --- a/libavcodec/h264_metadata_bsf.c
> +++ b/libavcodec/h264_metadata_bsf.c
> @@ -344,7 +344,6 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *out)
>          invalid_user_data:
>              av_log(bsf, AV_LOG_ERROR, "Invalid user data: "
>                     "must be \"UUID+string\".\n");
> -            err = AVERROR(EINVAL);
>          }
>      }
>  
> 

This is an error, but the analysis is misleading and therefore the suggested change is not correct.  I've applied a proper fix in <http://git.videolan.org/?p=ffmpeg.git;a=commit;h=56912555bc1921420f5271159b0c20034ab4209e>.

- Mark
diff mbox

Patch

diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index 89bdedf..09b3f1a 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -344,7 +344,6 @@  static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *out)
         invalid_user_data:
             av_log(bsf, AV_LOG_ERROR, "Invalid user data: "
                    "must be \"UUID+string\".\n");
-            err = AVERROR(EINVAL);
         }
     }