diff options
author | Simon Glass <sjg@chromium.org> | 2023-12-14 21:19:08 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-04-10 17:04:25 -0600 |
commit | 92ee1f5e1060ab059c3f0e47f8ff369981026739 (patch) | |
tree | 39acf26777b62f98b0937c03b3d0a6a272c82b83 | |
parent | c30e0842b152daa2dfb15bc642bb4d296016d4ac (diff) | |
download | u-boot-92ee1f5e1060ab059c3f0e47f8ff369981026739.zip u-boot-92ee1f5e1060ab059c3f0e47f8ff369981026739.tar.gz u-boot-92ee1f5e1060ab059c3f0e47f8ff369981026739.tar.bz2 |
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>
-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 a92bb89..2c87aba 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -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); |