public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCH] ARM:plat-s3c24xx: for memcpy, reading more things out of boundary
@ 2013-01-24  5:27 Chen Gang
  2013-02-17  3:57 ` Chen Gang
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Gang @ 2013-01-24  5:27 UTC (permalink / raw)
  To: linux-arm-kernel


  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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM:plat-s3c24xx: for memcpy, reading more things out of boundary
  2013-01-24  5:27 [PATCH] ARM:plat-s3c24xx: for memcpy, reading more things out of boundary Chen Gang
@ 2013-02-17  3:57 ` Chen Gang
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Gang @ 2013-02-17  3:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hello relative members:

  please give a glance for this patch, when you have time.

  thanks.

  :-)


gchen.


? 2013?01?24? 13:27, Chen Gang ??:
> 
>   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
> 


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-17  3:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24  5:27 [PATCH] ARM:plat-s3c24xx: for memcpy, reading more things out of boundary Chen Gang
2013-02-17  3:57 ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox