|
|
bf0270 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
bf0270 |
From: Glenn Washburn <development@efficientek.com>
|
|
|
bf0270 |
Date: Thu, 4 Mar 2021 18:22:32 -0600
|
|
|
bf0270 |
Subject: [PATCH] misc: Format string for grub_error() should be a literal
|
|
|
bf0270 |
|
|
|
bf0270 |
Signed-off-by: Glenn Washburn <development@efficientek.com>
|
|
|
bf0270 |
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
|
bf0270 |
(cherry-picked from commit 60875f4e15d704b875969b415501802b531c4db3)
|
|
|
bf0270 |
---
|
|
|
bf0270 |
grub-core/loader/efi/chainloader.c | 2 +-
|
|
|
bf0270 |
grub-core/net/tftp.c | 2 +-
|
|
|
bf0270 |
grub-core/script/lexer.c | 2 +-
|
|
|
bf0270 |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
bf0270 |
|
|
|
bf0270 |
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
|
|
bf0270 |
index 720f6181e5..8e658f713e 100644
|
|
|
bf0270 |
--- a/grub-core/loader/efi/chainloader.c
|
|
|
bf0270 |
+++ b/grub-core/loader/efi/chainloader.c
|
|
|
bf0270 |
@@ -79,7 +79,7 @@ grub_start_image (grub_efi_handle_t handle)
|
|
|
bf0270 |
*grub_utf16_to_utf8 ((grub_uint8_t *) buf,
|
|
|
bf0270 |
exit_data, exit_data_size) = 0;
|
|
|
bf0270 |
|
|
|
bf0270 |
- grub_error (GRUB_ERR_BAD_OS, buf);
|
|
|
bf0270 |
+ grub_error (GRUB_ERR_BAD_OS, "%s", buf);
|
|
|
bf0270 |
grub_free (buf);
|
|
|
bf0270 |
}
|
|
|
bf0270 |
}
|
|
|
bf0270 |
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
|
|
|
bf0270 |
index 85be965470..69a9ba6979 100644
|
|
|
bf0270 |
--- a/grub-core/net/tftp.c
|
|
|
bf0270 |
+++ b/grub-core/net/tftp.c
|
|
|
bf0270 |
@@ -253,7 +253,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
|
|
bf0270 |
case TFTP_ERROR:
|
|
|
bf0270 |
data->have_oack = 1;
|
|
|
bf0270 |
grub_netbuff_free (nb);
|
|
|
bf0270 |
- grub_error (GRUB_ERR_IO, (char *) tftph->u.err.errmsg);
|
|
|
bf0270 |
+ grub_error (GRUB_ERR_IO, "%s", tftph->u.err.errmsg);
|
|
|
bf0270 |
grub_error_save (&data->save_err);
|
|
|
bf0270 |
return GRUB_ERR_NONE;
|
|
|
bf0270 |
default:
|
|
|
bf0270 |
diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c
|
|
|
bf0270 |
index 5fb0cbd0bc..27daad791c 100644
|
|
|
bf0270 |
--- a/grub-core/script/lexer.c
|
|
|
bf0270 |
+++ b/grub-core/script/lexer.c
|
|
|
bf0270 |
@@ -349,7 +349,7 @@ void
|
|
|
bf0270 |
grub_script_yyerror (struct grub_parser_param *state, char const *err)
|
|
|
bf0270 |
{
|
|
|
bf0270 |
if (err)
|
|
|
bf0270 |
- grub_error (GRUB_ERR_INVALID_COMMAND, err);
|
|
|
bf0270 |
+ grub_error (GRUB_ERR_INVALID_COMMAND, "%s", err);
|
|
|
bf0270 |
|
|
|
bf0270 |
grub_print_error ();
|
|
|
bf0270 |
state->err++;
|