
From: Simon Glass <sjg@chromium.org> When 'bootflow read' is used to read images, initrd_str is not inited before strdup() is called. Note that this is only used by developers. Set the variable to an empty string to start. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/pxe_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 97ab7ec3365..99d8cfbe496 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -642,7 +642,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) char *kernel_addr = NULL; char *initrd_addr_str = NULL; char initrd_filesize[10]; - char initrd_str[28]; + char initrd_str[28] = ""; char mac_str[29] = ""; char ip_str[68] = ""; char *fit_addr = NULL; -- 2.43.0