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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 26 May 2013 18:09:07 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	rth@...ddle.net, ink@...assic.park.msu.ru, mattst88@...il.com
CC:	linux-alpha@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux-Arch <linux-arch@...r.kernel.org>
Subject: [PATCH] arch: alpha: kernel: sprintf(), the minimal buffer length
 is 20 for "0xffffffffffffffff\n"


For 'opcode_str' in sprintf(), the maximize length of format "0x%llx\n"
is 20 ("0xffffffffffffffff\n"), so need define 'opcode_str' at least 20
length.

Or the big number comes, it will cause issue.


Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
 arch/alpha/kernel/err_marvel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
index ae54ad9..2310082 100644
--- a/arch/alpha/kernel/err_marvel.c
+++ b/arch/alpha/kernel/err_marvel.c
@@ -275,7 +275,7 @@ marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)
 static void
 marvel_print_po7_ugbge_sym(u64 ugbge_sym)
 {
-	char opcode_str[10];
+	char opcode_str[20];
 
 #define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__S	(6)
 #define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__M	(0xfffffffful)
-- 
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists