diff mbox series

[FFmpeg-devel,1/3] avfilter/avfiltergraph: Remove NULL checks after dereferences

Message ID 20210518213910.28732-1-michael@niedermayer.cc
State Accepted
Commit 1642d8188d6e475b12ef41ec9b5775e5abadeb0d
Headers show
Series [FFmpeg-devel,1/3] avfilter/avfiltergraph: Remove NULL checks after dereferences
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer May 18, 2021, 9:39 p.m. UTC
Fixes: CID1398579 Dereference before null check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavfilter/avfiltergraph.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nicolas George May 19, 2021, 2:26 p.m. UTC | #1
Michael Niedermayer (12021-05-18):
> Fixes: CID1398579 Dereference before null check
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavfilter/avfiltergraph.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Good, thanks.

Regards,
Michael Niedermayer May 19, 2021, 6:24 p.m. UTC | #2
On Wed, May 19, 2021 at 04:26:33PM +0200, Nicolas George wrote:
> Michael Niedermayer (12021-05-18):
> > Fixes: CID1398579 Dereference before null check
> > 
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavfilter/avfiltergraph.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Good, thanks.

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index ed54d3dc11..5389d82d9f 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -1360,8 +1360,8 @@  int avfilter_graph_request_oldest(AVFilterGraph *graph)
         if (r != AVERROR_EOF)
             break;
         av_log(oldest->dst, AV_LOG_DEBUG, "EOF on sink link %s:%s.\n",
-               oldest->dst ? oldest->dst->name : "unknown",
-               oldest->dstpad ? oldest->dstpad->name : "unknown");
+               oldest->dst->name,
+               oldest->dstpad->name);
         /* EOF: remove the link from the heap */
         if (oldest->age_index < --graph->sink_links_count)
             heap_bubble_down(graph, graph->sink_links[graph->sink_links_count],