From: Chen Gang <gang.chen@asianux.com>
To: rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com
Cc: linux-alpha@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux-Arch <linux-arch@vger.kernel.org>
Subject: [PATCH] arch: alpha: kernel: sprintf(), the minimal buffer length is 20 for "0xffffffffffffffff\n"
Date: Sun, 26 May 2013 18:09:07 +0800 [thread overview]
Message-ID: <51A1DF43.5090503@asianux.com> (raw)
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@asianux.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
reply other threads:[~2013-05-26 10:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51A1DF43.5090503@asianux.com \
--to=gang.chen@asianux.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox