[PATCH 1/2] ACPI: PRM: apply ACPI_NONSTRING annotation

From: Ahmed Salem
Date: Fri Apr 04 2025 - 04:25:27 EST


Mark ACPI_COPY_NAMESEG() destination char array with the ACPI_NONSTRING
annotation. prm_content_buffer->signature[ACPI_NAMESEG_SIZE] is 4 bytes
long and not expected to include a NUL terminating character.

Signed-off-by: Ahmed Salem <x0rw3ll@xxxxxxxxx>

diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
index e549914a636c..7c2553696dd1 100644
--- a/drivers/acpi/prmt.c
+++ b/drivers/acpi/prmt.c
@@ -40,7 +40,7 @@ struct prm_buffer {
};

struct prm_context_buffer {
- char signature[ACPI_NAMESEG_SIZE];
+ char signature[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
u16 revision;
u16 reserved;
guid_t identifier;
--
2.47.2