[PATCH] Fix fdt string warnings
Aschref Ben-Thabet
aschref.ben-thabet at embedded-brains.de
Tue Sep 15 09:08:34 UTC 2020
From: Aschref Ben Thabet <aschref.ben-thabet at embedded-brains.de>
---
cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
index 39e70bffec..d2b412ceb0 100644
--- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
+++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
@@ -264,7 +264,7 @@ rtems_fdt_index_find_by_name(rtems_fdt_index* index,
namelen = sizeof(path) - 1;
}
- strncpy(path, name, namelen);
+ memcpy(path, name, namelen);
path[namelen] = 0;
cmp_name = path;
}
--
2.26.2
More information about the devel
mailing list