From: Stephane Eranian <eranian@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] fix uninitialized string in get_model_name()
Date: Fri, 01 Dec 2006 16:30:35 +0000 [thread overview]
Message-ID: <20061201163035.GE31914@frankl.hpl.hp.com> (raw)
Hello,
If ia64_pal_get_brand_info() fails in get_model_name() we may be copying
an invalid string.
changelog:
- initialize brand[] in get_model_name()
signed-off-by: stephane eranian <eranian@hpl.hp.com>
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 2fd4b7d..cc82f6a 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -616,6 +616,8 @@ get_model_name(__u8 family, __u8 model)
{
char brand[128];
+ memset(brand, 0, sizeof(brand));
+
if (ia64_pal_get_brand_info(brand)) {
if (family = 0x7)
memcpy(brand, "Merced", 7);
--
-Stephane
next reply other threads:[~2006-12-01 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 16:30 Stephane Eranian [this message]
2006-12-01 17:15 ` [PATCH] fix uninitialized string in get_model_name() Luck, Tony
2006-12-01 20:45 ` Stephane Eranian
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=20061201163035.GE31914@frankl.hpl.hp.com \
--to=eranian@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/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