diff options
Diffstat (limited to 'source/components/utilities')
40 files changed, 48 insertions, 57 deletions
diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c index 959a5e535cc5..6d1b9aa48189 100644 --- a/source/components/utilities/utaddress.c +++ b/source/components/utilities/utaddress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index 544b8f376fdf..ae3c6a93649a 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utascii.c b/source/components/utilities/utascii.c index 85e2f52ca520..05918b1696b0 100644 --- a/source/components/utilities/utascii.c +++ b/source/components/utilities/utascii.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index 13b624ed8079..b08d260b83f1 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c index 5c67a2989a67..2f80c77f63e7 100644 --- a/source/components/utilities/utcache.c +++ b/source/components/utilities/utcache.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -433,9 +433,9 @@ AcpiOsAcquireObject ( { /* The cache is empty, create a new object */ - ACPI_MEM_TRACKING (Cache->TotalAllocated++); - #ifdef ACPI_DBG_TRACK_ALLOCATIONS + ACPI_MEM_TRACKING (Cache->TotalAllocated++); + if ((Cache->TotalAllocated - Cache->TotalFreed) > Cache->MaxOccupied) { Cache->MaxOccupied = Cache->TotalAllocated - Cache->TotalFreed; diff --git a/source/components/utilities/utcksum.c b/source/components/utilities/utcksum.c index 95d39dfaa748..5469075c6ba6 100644 --- a/source/components/utilities/utcksum.c +++ b/source/components/utilities/utcksum.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index f90ae7de7e8b..cf1acf0e5afd 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c index f7ae8a64be7e..338b9f9c0c07 100644 --- a/source/components/utilities/utcopy.c +++ b/source/components/utilities/utcopy.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c index ea43f4323e20..0c7dd83292c7 100644 --- a/source/components/utilities/utdebug.c +++ b/source/components/utilities/utdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 54c13893eba9..4f26e3aa3139 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index 922358d71d99..868ad0e580a6 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -574,7 +574,7 @@ AcpiUtUpdateRefCount ( "Obj %p Type %.2X [%s] Refs %.2X [Incremented]\n", Object, Object->Common.Type, AcpiUtGetObjectTypeName (Object), NewCount)); - Message = "Incremement"; + Message = "Increment"; break; case REF_DECREMENT: diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c index eb33f95323ba..6502794cf5b2 100644 --- a/source/components/utilities/uterror.c +++ b/source/components/utilities/uterror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index a56ee1da650c..d33d73655a22 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utexcep.c b/source/components/utilities/utexcep.c index b69640ac90b3..aa0ff78d4953 100644 --- a/source/components/utilities/utexcep.c +++ b/source/components/utilities/utexcep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 070ec63cd232..2b953ddac14f 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c index 26f5515bd4ab..7343b99c420e 100644 --- a/source/components/utilities/uthex.c +++ b/source/components/utilities/uthex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 28e28900ecba..9d9b07584747 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c index e100e0f38ca4..2299f58dd162 100644 --- a/source/components/utilities/utinit.c +++ b/source/components/utilities/utinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utlock.c b/source/components/utilities/utlock.c index 6ddc47a8d6fd..c7ee5a575bed 100644 --- a/source/components/utilities/utlock.c +++ b/source/components/utilities/utlock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c index 7d7eb88585ce..a3692d725b8a 100644 --- a/source/components/utilities/utmath.c +++ b/source/components/utilities/utmath.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c index 7c2ca0ae0649..7c0f9810204f 100644 --- a/source/components/utilities/utmisc.c +++ b/source/components/utilities/utmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c index c8a4aedd8a99..bc1a43afc062 100644 --- a/source/components/utilities/utmutex.c +++ b/source/components/utilities/utmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utnonansi.c b/source/components/utilities/utnonansi.c index 9c3ca8e8de50..ba5b3ee6c723 100644 --- a/source/components/utilities/utnonansi.c +++ b/source/components/utilities/utnonansi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -353,7 +353,7 @@ AcpiUtSafeStrncpy ( { /* Always terminate destination string */ - strncpy (Dest, Source, DestSize); + memcpy (Dest, Source, DestSize); Dest[DestSize - 1] = 0; } diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 8ca5404eacb7..30b2fd99c92f 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index ebf04d27c382..8edd783ccf23 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c index 0bfeb01a117f..31c6db05a474 100644 --- a/source/components/utilities/utownerid.c +++ b/source/components/utilities/utownerid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c index 146722687c88..1bda772a06d2 100644 --- a/source/components/utilities/utpredef.c +++ b/source/components/utilities/utpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c index 7d8611b0327b..3d26ab54a141 100644 --- a/source/components/utilities/utprint.c +++ b/source/components/utilities/utprint.c @@ -561,12 +561,8 @@ vsnprintf ( Pos = String; - - if (Size != ACPI_UINT32_MAX) { - End = String + Size; - } else { - End = ACPI_CAST_PTR(char, ACPI_UINT32_MAX); - } + Size = ACPI_MIN(Size, ACPI_PTR_DIFF(ACPI_MAX_PTR, String)); + End = String + Size; for (; *Format; ++Format) { diff --git a/source/components/utilities/utresdecode.c b/source/components/utilities/utresdecode.c index 09021882a43f..070552fc4c93 100644 --- a/source/components/utilities/utresdecode.c +++ b/source/components/utilities/utresdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 70260d441332..c952e7621d5d 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -532,21 +532,16 @@ AcpiUtValidateResource ( AmlResource = ACPI_CAST_PTR (AML_RESOURCE, Aml); if (ResourceType == ACPI_RESOURCE_NAME_SERIAL_BUS) { - /* Avoid undefined behavior: member access within misaligned address */ - - AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus; - memcpy(&CommonSerialBus, AmlResource, sizeof(CommonSerialBus)); - /* Validate the BusType field */ - if ((CommonSerialBus.Type == 0) || - (CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)) + if ((AmlResource->CommonSerialBus.Type == 0) || + (AmlResource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)) { if (WalkState) { ACPI_ERROR ((AE_INFO, "Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X", - CommonSerialBus.Type)); + AmlResource->CommonSerialBus.Type)); } return (AE_AML_INVALID_RESOURCE_TYPE); } diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c index be699494a5a8..1dbecba74da7 100644 --- a/source/components/utilities/utstate.c +++ b/source/components/utilities/utstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index f9613c74aacb..19ddd2581eac 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrsuppt.c b/source/components/utilities/utstrsuppt.c index f5c6b372d36f..0c96520d4b2c 100644 --- a/source/components/utilities/utstrsuppt.c +++ b/source/components/utilities/utstrsuppt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrtoul64.c b/source/components/utilities/utstrtoul64.c index 101d0ca5d332..8b927db677de 100644 --- a/source/components/utilities/utstrtoul64.c +++ b/source/components/utilities/utstrtoul64.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c index 57602ba1937c..fa5c49fbcf98 100644 --- a/source/components/utilities/uttrack.c +++ b/source/components/utilities/uttrack.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c index 4c8b00693fe8..5eacf9fc6d03 100644 --- a/source/components/utilities/utuuid.c +++ b/source/components/utilities/utuuid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index f9b685eccb9f..5e10fc23c528 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 9a742bbf9e5b..43e940f636b7 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index c8bb0ceaf392..8c6da2fba74d 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c index 6effac03f209..b82a4a95490a 100644 --- a/source/components/utilities/utxfmutex.c +++ b/source/components/utilities/utxfmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. * All rights reserved. * * 2. License |