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>
This commit is contained in:
Simon Glass
2025-03-18 13:12:15 -06:00
committed by Tom Rini
parent c73da92304
commit 0fd3ed1cd7
+1 -1
View File
@@ -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);