lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Jan 2022 10:29:25 +0100
From:   Martin Liška <mliska@...e.cz>
To:     linux-kernel@...r.kernel.org
Subject: [PATCH] objtool: Fix -Wformat-truncation seen with GCC 12.

The patch fixes the following warning that seems reasonable:

check.c:2836:58: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=]
2836 |                 snprintf(pvname, sizeof(pvname), "pv_ops[%d]", idx);

Signed-off-by: Martin Liška <mliska@...e.cz>
---
  tools/objtool/check.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a9a1f7259d62..9555f7ad57cd 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2852,7 +2852,7 @@ static inline bool func_uaccess_safe(struct symbol *func)
  
  static inline const char *call_dest_name(struct instruction *insn)
  {
-	static char pvname[16];
+	static char pvname[20];
  	struct reloc *rel;
  	int idx;
  
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ