From: gang.chen@asianux•com (Chen Gang)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM:plat-s3c24xx: for memcpy, reading more things out of boundary
Date: Thu, 24 Jan 2013 13:27:31 +0800 [thread overview]
Message-ID: <5100C643.5010101@asianux.com> (raw)
the size is made by "plls_no + 1".
so when copy from original buffer, need dec 1, or reading out of boundary.
additional info:
plls_no is ARRARY_SIZE(plls).
Signed-off-by: Chen Gang <gang.chen@asianux•com>
---
arch/arm/plat-s3c24xx/cpu-freq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/plat-s3c24xx/cpu-freq.c b/arch/arm/plat-s3c24xx/cpu-freq.c
index 4680799..df093b2 100644
--- a/arch/arm/plat-s3c24xx/cpu-freq.c
+++ b/arch/arm/plat-s3c24xx/cpu-freq.c
@@ -700,7 +700,8 @@ int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
vals = kmalloc(size, GFP_KERNEL);
if (vals) {
- memcpy(vals, plls, size);
+ memcpy(vals, plls,
+ size - sizeof(struct cpufreq_frequency_table));
pll_reg = vals;
/* write a terminating entry, we don't store it in the
--
1.7.10.4
next reply other threads:[~2013-01-24 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 5:27 Chen Gang [this message]
2013-02-17 3:57 ` [PATCH] ARM:plat-s3c24xx: for memcpy, reading more things out of boundary Chen Gang
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=5100C643.5010101@asianux.com \
--to=gang.chen@asianux$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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