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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user