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

Ahmed Salem posted 2 patches 10 months, 1 week ago
[PATCH 1/2] ACPI: PRM: apply ACPI_NONSTRING annotation
Posted by Ahmed Salem 10 months, 1 week ago
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@gmail.com>

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