mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-03 01:23:29 +08:00
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:
parent
c30e0842b1
commit
92ee1f5e10
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user