diff options
Diffstat (limited to 'ports_module/cortex-r4/iar')
| -rw-r--r-- | ports_module/cortex-r4/iar/inc/tx_port.h | 11 | ||||
| -rw-r--r-- | ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c | 13 |
2 files changed, 18 insertions, 6 deletions
diff --git a/ports_module/cortex-r4/iar/inc/tx_port.h b/ports_module/cortex-r4/iar/inc/tx_port.h index 34a300e5..b653cd20 100644 --- a/ports_module/cortex-r4/iar/inc/tx_port.h +++ b/ports_module/cortex-r4/iar/inc/tx_port.h @@ -26,7 +26,7 @@ /* PORT SPECIFIC C INFORMATION RELEASE */ /* */ /* tx_port.h Cortex-R4/IAR */ -/* 6.1 */ +/* 6.1.6 */ /* */ /* AUTHOR */ /* */ @@ -48,6 +48,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 09-30-2020 William E. Lamie Initial Version 6.1 */ +/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */ +/* macro definition, */ +/* resulting in version 6.1.6 */ /* */ /**************************************************************************/ @@ -347,9 +350,9 @@ __intrinsic void __set_CPSR( unsigned long ); #if (__VER__ < 8002000) -#define TX_INTERRUPT_SAVE_AREA unsigned long interrupt_save; +#define TX_INTERRUPT_SAVE_AREA ULONG interrupt_save; #else -#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save; +#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save; #endif #define TX_DISABLE interrupt_save = __get_CPSR(); \ @@ -392,7 +395,7 @@ void tx_thread_vfp_disable(void); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-R4/IAR Version 6.1 *"; + "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-R4/IAR Version 6.1.6 *"; #else #ifdef TX_MISRA_ENABLE extern CHAR _tx_version_id[100]; diff --git a/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c index b2c21835..cc59721d 100644 --- a/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c +++ b/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c @@ -464,7 +464,7 @@ UINT i; /* FUNCTION RELEASE */ /* */ /* _txm_module_manager_inside_data_check Cortex-R4/MPU/IAR */ -/* 6.1 */ +/* 6.1.6 */ /* AUTHOR */ /* */ /* Scott Larson, Microsoft Corporation */ @@ -496,7 +496,10 @@ UINT i; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 09-30-2020 Scott Larson Initial Version 6.1 */ +/* 09-30-2020 Scott Larson Initial Version 6.1 */ +/* 04-02-2021 Scott Larson Modified comments, added */ +/* check for overflow, * +/* resulting in version 6.1.6 */ /* */ /**************************************************************************/ UINT _txm_module_manager_inside_data_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE obj_ptr, UINT obj_size) @@ -507,6 +510,12 @@ UINT num_shared_memory_mpu_entries; ALIGN_TYPE shared_memory_address_start; ALIGN_TYPE shared_memory_address_end; + /* Check for overflow. */ + if ((obj_ptr) > ((obj_ptr) + (obj_size))) + { + return(TX_FALSE); + } + /* Check if the object is inside the module data. */ if ((obj_ptr >= (ALIGN_TYPE) module_instance -> txm_module_instance_data_start) && ((obj_ptr + obj_size) <= ((ALIGN_TYPE) module_instance -> txm_module_instance_data_end + 1))) |
