summaryrefslogtreecommitdiff
path: root/acpi/acpifs.c
diff options
context:
space:
mode:
Diffstat (limited to 'acpi/acpifs.c')
-rw-r--r--acpi/acpifs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/acpi/acpifs.c b/acpi/acpifs.c
index e779e0f9..2b5fbc00 100644
--- a/acpi/acpifs.c
+++ b/acpi/acpifs.c
@@ -39,7 +39,8 @@ create_dir_entry (char *name, struct acpi_table *t,
{
uint16_t parent_num_entries;
- strncpy (entry->name, name, NAME_SIZE);
+ strncpy (entry->name, name, NAME_SIZE-1);
+ entry->name[NAME_SIZE-1] = '\0';
entry->acpitable = t;
entry->parent = parent;
entry->stat = stat;