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, 29 May 2013 17:43:16 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Mike Frysinger <vapier@...too.org>, anton.vorontsov@...aro.org,
	Richard Kuo <rkuo@...eaurora.org>, jesper.nilsson@...s.com
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	"uclinux-dist-devel@...ckfin.uclinux.org" 
	<uclinux-dist-devel@...ckfin.uclinux.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux-Arch <linux-arch@...r.kernel.org>
Subject: [PATCH] arch: blackfin: kernel: sprintf(), need avoid NUL for '%s'


When it is kernel symbol, the 'modname' will be NUL, and the 'symname'
contents the valid name.

So for sprintf(), need avoid NUL for '%s'.


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

diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/kernel/trace.c
index c36efa0..11f98bb 100644
--- a/arch/blackfin/kernel/trace.c
+++ b/arch/blackfin/kernel/trace.c
@@ -51,7 +51,7 @@ void decode_address(char *buf, unsigned long address)
 		if (!modname)
 			modname = delim = "";
 		sprintf(buf, "{ %s%s%s%s + 0x%lx }",
-			delim, modname, delim, symname,
+			delim, modname ? : "kernel", delim, symname,
 			(unsigned long)offset);
 		return;
 	}
-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ