[vlc-commits] input: avoid memcpy(NULL, NULL, 0)

Rémi Denis-Courmont git at videolan.org
Wed Apr 13 22:32:15 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 13 23:31:58 2016 +0300| [7acc7166b87749856a24fcaed3c9b5775fd0f0e5] | committer: Rémi Denis-Courmont

input: avoid memcpy(NULL, NULL, 0)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7acc7166b87749856a24fcaed3c9b5775fd0f0e5
---

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

diff --git a/src/input/item.c b/src/input/item.c
index 7a24519..3b4101a 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -181,6 +181,9 @@ void input_item_CopyOptions( input_item_t *p_parent,
 
     vlc_mutex_unlock( &p_parent->lock );
 
+    if( optc == 0 )
+        return;
+
     vlc_mutex_lock( &p_child->lock );
 
     p_child->ppsz_options = xrealloc( p_child->ppsz_options,



More information about the vlc-commits mailing list