[vlc-devel] [PATCH] preparser: fix dereference of uninitialized pointer
Thomas Guillem
thomas at gllm.fr
Wed Jun 5 09:23:44 CEST 2019
task->ref could be accessed from the input item preparser before being set.
Fixes #22377
---
src/preparser/preparser.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
index 5f39432cd3..f59519aef1 100644
--- a/src/preparser/preparser.c
+++ b/src/preparser/preparser.c
@@ -128,14 +128,13 @@ static int PreparserOpenInput( void* preparser_, void* req_, void** out )
atomic_init( &task->done, false );
task->preparser = preparser_;
+ task->req = req;
+ task->preparse_status = -1;
task->parser = input_item_Parse( req->item, preparser->owner, &cbs,
task );
if( !task->parser )
goto error;
- task->req = req;
- task->preparse_status = -1;
-
*out = task;
return VLC_SUCCESS;
--
2.20.1
More information about the vlc-devel
mailing list