[vlc-commits] input: prevent wild pointer in the case of no attachment

Zhao Zhili git at videolan.org
Mon Sep 24 11:11:14 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Fri Sep 21 09:41:29 2018 +0800| [f49768187fa97e2927f45e9a458e34095514ccdf] | committer: Thomas Guillem

input: prevent wild pointer in the case of no attachment

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 src/input/input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/input/input.c b/src/input/input.c
index 3edd5844b0..a0f9c5d072 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3386,6 +3386,7 @@ int input_GetAttachments(input_thread_t *input,
     if (attachments_count <= 0)
     {
         vlc_mutex_unlock(&priv->p_item->lock);
+        *attachments = NULL;
         return 0;
     }
 



More information about the vlc-commits mailing list