aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/boot/uboot-at91/patches/001-fix-Wformat-security.patch')
-rw-r--r--package/boot/uboot-at91/patches/001-fix-Wformat-security.patch46
1 files changed, 26 insertions, 20 deletions
diff --git a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
index 23cb5828b34..de92dd41670 100644
--- a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
+++ b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
@@ -1,21 +1,40 @@
-diff --git a/cmd/version.c b/cmd/version.c
-index b2fffe99..bcbbeb18 100644
+From 3b05406c02070df3e7f19399d81ebd35ed6deae5 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea@microchip.com>
+Date: Tue, 12 Oct 2021 17:43:28 +0300
+Subject: [PATCH] fix -Wformat-security
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
+---
+ cmd/panic.c | 2 +-
+ cmd/version.c | 2 +-
+ drivers/pinctrl/pinctrl-uclass.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/cmd/panic.c
++++ b/cmd/panic.c
+@@ -11,7 +11,7 @@ static int do_panic(struct cmd_tbl *cmdt
+ {
+ char *text = (argc < 2) ? "" : argv[1];
+
+- panic(text);
++ panic("%s\n", text);
+
+ return CMD_RET_SUCCESS;
+ }
--- a/cmd/version.c
+++ b/cmd/version.c
-@@ -18,7 +18,7 @@ static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+@@ -24,7 +24,7 @@ static int do_version(struct cmd_tbl *cm
{
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
- printf(display_options_get_banner(false, buf, sizeof(buf)));
-+ printf("%s",display_options_get_banner(false, buf, sizeof(buf)));
++ printf("%s", display_options_get_banner(false, buf, sizeof(buf)));
#ifdef CC_VERSION_STRING
puts(CC_VERSION_STRING "\n");
#endif
-diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
-index 3425ed11..8c2e1d5c 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
-@@ -368,7 +368,7 @@ int pinctrl_get_pin_name(struct udevice *dev, int selector, char *buf,
+@@ -375,7 +375,7 @@ int pinctrl_get_pin_name(struct udevice
if (!ops->get_pin_name)
return -ENOSYS;
@@ -24,16 +43,3 @@ index 3425ed11..8c2e1d5c 100644
return 0;
}
-diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
-index c316bdfe..5fe8129c 100644
---- a/lib/efi_loader/efi_variable.c
-+++ b/lib/efi_loader/efi_variable.c
-@@ -522,7 +522,7 @@ efi_status_t EFIAPI efi_set_variable(u16 *variable_name,
-
- if (old_size)
- /* APPEND_WRITE */
-- s += sprintf(s, old_val);
-+ s += sprintf(s, "%s", old_val);
- else
- s += sprintf(s, "(blob)");
-