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

Filip Roséen filip at atch.se
Wed Mar 1 09:52:06 CET 2017


If an error occurs during the path leading up to this point, epg is
NULL.
---
 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 5b8afa86e5..fe62c5fe50 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);
         }
     }
-- 
2.12.0



More information about the vlc-devel mailing list