From 03747b508779ccddef3b7e39da825a7037fa8453 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 23 Apr 2021 08:19:43 +0200 Subject: rtems: Check for NULL config in msgq construct Since there are already excessive NULL pointer checks in the Classic API, do this also in rtems_message_queue_construct(). Update #4007. --- cpukit/rtems/src/msgqconstruct.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpukit') diff --git a/cpukit/rtems/src/msgqconstruct.c b/cpukit/rtems/src/msgqconstruct.c index 6cada4c570..6af57454cc 100644 --- a/cpukit/rtems/src/msgqconstruct.c +++ b/cpukit/rtems/src/msgqconstruct.c @@ -50,6 +50,10 @@ rtems_status_code rtems_message_queue_construct( rtems_id *id ) { + if ( config == NULL ) { + return RTEMS_INVALID_ADDRESS; + } + return _Message_queue_Create( config, id, _Message_queue_Get_buffers ); } -- cgit v1.2.3