pxe: Use strlcpy() instead of strcpy() in label_boot()

The intention here is to nul-terminate the result string, so use the
correct function for that.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2023-12-14 21:19:08 -07:00 committed by Tom Rini
parent c30e0842b1
commit 92ee1f5e10

View File

@ -593,7 +593,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);