[PATCH] rtems: rtems_scheduler_ident_by_processor_set()
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed May 5 11:27:51 UTC 2021
Check for a NULL processor set pointer.
---
cpukit/rtems/src/scheduleridentbyprocessorset.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpukit/rtems/src/scheduleridentbyprocessorset.c b/cpukit/rtems/src/scheduleridentbyprocessorset.c
index 3d48bfba3e..8d55d470f5 100644
--- a/cpukit/rtems/src/scheduleridentbyprocessorset.c
+++ b/cpukit/rtems/src/scheduleridentbyprocessorset.c
@@ -44,6 +44,10 @@ rtems_status_code rtems_scheduler_ident_by_processor_set(
return RTEMS_INVALID_ADDRESS;
}
+ if ( cpuset == NULL ) {
+ return RTEMS_INVALID_ADDRESS;
+ }
+
status = _Processor_mask_From_cpu_set_t( &set, cpusetsize, cpuset );
if ( status == PROCESSOR_MASK_COPY_INVALID_SIZE ) {
return RTEMS_INVALID_SIZE;
--
2.26.2
More information about the devel
mailing list