[vlc-devel] [PATCH 1/3] item: missing NULL check

RĂ©mi Denis-Courmont remi at remlab.net
Sun Sep 27 20:04:35 CEST 2020


---
 src/input/item.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/input/item.c b/src/input/item.c
index 1c03af739b..714a839dda 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1115,7 +1115,8 @@ input_item_t *input_item_Copy( input_item_t *p_input )
     if( likely(item != NULL) && p_input->p_meta != NULL )
     {
         meta = vlc_meta_New();
-        vlc_meta_Merge( meta, p_input->p_meta );
+        if( likely(meta != NULL) )
+            vlc_meta_Merge( meta, p_input->p_meta );
     }
     b_net = p_input->b_net;
 
-- 
2.28.0



More information about the vlc-devel mailing list