[vlc-commits] video_output/epg: vout_OSDEpg: prevent null-dereference

Filip Roséen git at videolan.org
Wed Mar 1 17:43:20 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar  1 09:52:06 2017 +0100| [64107e726cb025e255b053d79d6f5d2ebfd734c4] | committer: Jean-Baptiste Kempf

video_output/epg: vout_OSDEpg: prevent null-dereference

If an error occurs during the path leading up to this point, epg is
NULL.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/video_output/video_epg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video_output/video_epg.c b/src/video_output/video_epg.c
index 5b8afa8..fe62c5f 100644
--- a/src/video_output/video_epg.c
+++ b/src/video_output/video_epg.c
@@ -311,7 +311,7 @@ int vout_OSDEpg(vout_thread_t *vout, input_item_t *input)
                     else vlc_epg_SetCurrent(epg, p_event->i_start);
                 }
             }
-            if(tmp->psz_name)
+            if(epg && tmp->psz_name)
                 epg->psz_name = strdup(tmp->psz_name);
         }
     }



More information about the vlc-commits mailing list