[vlc-devel] [PATCH 1/3] preparser: Fix null dereference in case of error

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Nov 13 14:07:02 CET 2020


---
 src/preparser/preparser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
index 255efc6ce1..0dbd4853d5 100644
--- a/src/preparser/preparser.c
+++ b/src/preparser/preparser.c
@@ -367,6 +367,8 @@ void input_preparser_Push( input_preparser_t *preparser,
                                           : VLC_TICK_FROM_MS(timeout_ms);
     struct task *task =
         TaskNew(preparser, item, i_options, cbs, cbs_userdata, id, timeout);
+    if( !task )
+        return;
 
     PreparserAddTask(preparser, task);
 
-- 
2.29.2



More information about the vlc-devel mailing list