Merged fix for advisory GHSA-w8rw-fqgj-9r49 provided by Bill Lamie.

This commit is contained in:
Frédéric Desbiens
2025-07-14 16:33:19 -04:00
parent 7ad78c40e9
commit da0985e748

View File

@@ -1,5 +1,6 @@
/*************************************************************************** /***************************************************************************
* Copyright (c) 2024 Microsoft Corporation * Copyright (c) 2024 Microsoft Corporation
* Copyright (c) 2025 Eclipse ThreadX Contributors
* *
* This program and the accompanying materials are made available under the * This program and the accompanying materials are made available under the
* terms of the MIT License which is available at * terms of the MIT License which is available at
@@ -2389,6 +2390,11 @@ static ALIGN_TYPE _txm_module_manager_tx_thread_preemption_change_dispatch(TXM_M
ALIGN_TYPE return_value; ALIGN_TYPE return_value;
if (param_1 < module_instance -> txm_module_instance_maximum_priority)
{
return(TX_THRESH_ERROR);
}
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
{ {
if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
@@ -2418,6 +2424,11 @@ static ALIGN_TYPE _txm_module_manager_tx_thread_priority_change_dispatch(TXM_MOD
ALIGN_TYPE return_value; ALIGN_TYPE return_value;
if (param_1 < module_instance -> txm_module_instance_maximum_priority)
{
return(TX_PRIORITY_ERROR);
}
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
{ {
if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))