diff options
author | Simon Glass <sjg@chromium.org> | 2025-03-05 17:25:03 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-03-18 13:12:15 -0600 |
commit | 0fd3ed1cd73d6b262c204c27cbe6dc1ad1c09e91 (patch) | |
tree | 535b3e973122439c9d9e41a40266c3a6e471b0de | |
parent | c73da92304280b229e3d8dfd565fae5a24fe3ce8 (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>
-rw-r--r-- | boot/pxe_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 82f217aaf86..e96935896a9 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -558,7 +558,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) } if (label->append) - strncpy(bootargs, label->append, sizeof(bootargs)); + strlcpy(bootargs, label->append, sizeof(bootargs)); strcat(bootargs, ip_str); strcat(bootargs, mac_str); |