[vlc-commits] str_format_meta: NULL dereference

Rémi Denis-Courmont git at videolan.org
Wed Dec 17 17:50:27 CET 2014


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 17 17:51:08 2014 +0200| [5fc1be25617abfb272f5fcf3c6c7dfdf69fc8747] | committer: Jean-Baptiste Kempf

str_format_meta: NULL dereference

(cherry picked from commit 090a04a3e80a9bf0a7cda391c869e223f170e4da)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/text/strings.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/text/strings.c b/src/text/strings.c
index d7212ea..a57014b 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -761,6 +761,8 @@ char *str_format_meta(input_thread_t *input, const char *s)
                 fputc('\n', stream);
                 break;
             case 'Z':
+                if (item == NULL)
+                    break;
                 if (write_meta(stream, item, vlc_meta_NowPlaying) == EOF)
                 {
                     char *title = input_item_GetTitleFbName(item);



More information about the vlc-commits mailing list