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
2024-12-05 19:35:48 -07:00
parent 2f41a89480
commit 89f9271b17

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);