From f14cf0cd743b6ac128ce5b9007023c57e322500f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 23 Apr 2021 08:21:48 +0200 Subject: rtems: Check for NULL config in task construct Since there are already excessive NULL pointer checks in the Classic API, do this also in rtems_task_construct(). Update #3959. --- cpukit/rtems/src/taskconstruct.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpukit/rtems') diff --git a/cpukit/rtems/src/taskconstruct.c b/cpukit/rtems/src/taskconstruct.c index a39db3a7ae..e267db2fc5 100644 --- a/cpukit/rtems/src/taskconstruct.c +++ b/cpukit/rtems/src/taskconstruct.c @@ -103,6 +103,10 @@ rtems_status_code rtems_task_construct( rtems_id *id ) { + if ( config == NULL ) { + return RTEMS_INVALID_ADDRESS; + } + return _RTEMS_tasks_Create( config, id, _RTEMS_tasks_Prepare_user_stack ); } -- cgit v1.2.3