From 9399e12c217343545bf412a01629570377536b39 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 10 Aug 2021 12:42:11 +0200 Subject: rtems: Fix rtems_partition_return_buffer() The rtems_partition_return_buffer() wrongly accepted which were exactly at the buffer area end. Use the buffer area limit address for the range checking. Close #4490. --- cpukit/include/rtems/rtems/partdata.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'cpukit/include/rtems/rtems') diff --git a/cpukit/include/rtems/rtems/partdata.h b/cpukit/include/rtems/rtems/partdata.h index 73babd36f4..196c2142ae 100644 --- a/cpukit/include/rtems/rtems/partdata.h +++ b/cpukit/include/rtems/rtems/partdata.h @@ -48,15 +48,20 @@ typedef struct { ISR_LOCK_MEMBER( Lock ) /** - * @brief This member contains the physical starting address of the buffer - * area. + * @brief This member contains the base address of the buffer area. + * + * The base address is the address of the first byte contained in the buffer + * area. */ - void *starting_address; + const void *base_address; /** - * @brief This member contains the size of the buffer area in bytes. + * @brief This member contains the limit address of the buffer area. + * + * The limit address is the address of the last byte contained in the buffer + * area. */ - uintptr_t length; + const void *limit_address; /** * @brief This member contains the size of each buffer in bytes. -- cgit v1.2.3