commit | 1a47ebba2c59c7b6c51048a93bfef9b987c1edb7 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Wed Mar 05 17:25:03 2025 -0700 |
committer | Tom Rini <trini@konsulko.com> | Tue Mar 18 13:12:15 2025 -0600 |
tree | 535b3e973122439c9d9e41a40266c3a6e471b0de | |
parent | e3b0def94b8e5b72d4d7ca2c758a950542f4cd1a [diff] |
boot: Use strlcpy() in label_boot() This function is recommended instead of strncpy() since it always terminates the string. Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 82f217a..e969358 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c
@@ -558,7 +558,7 @@ } if (label->append) - strncpy(bootargs, label->append, sizeof(bootargs)); + strlcpy(bootargs, label->append, sizeof(bootargs)); strcat(bootargs, ip_str); strcat(bootargs, mac_str);