projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e508edb
)
staging: spectra: don't read past array in Conv_Spare_Data_Log2Phy_Format()
author
roel kluin
<roel.kluin@gmail.com>
Mon, 3 Jan 2011 19:59:14 +0000
(11:59 -0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 21 Jan 2011 20:13:07 +0000
(12:13 -0800)
It should decrement or we read past the array
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/spectra/lld_nand.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/spectra/lld_nand.c
b/drivers/staging/spectra/lld_nand.c
index 2263d3ea5456e3522e79c979c439a33d2dfa77b3..0be7adc96b8c2ecebb9abcaea77d1548613c7e48 100644
(file)
--- a/
drivers/staging/spectra/lld_nand.c
+++ b/
drivers/staging/spectra/lld_nand.c
@@
-1400,7
+1400,7
@@
void Conv_Spare_Data_Log2Phy_Format(u8 *data)
const u32 PageSpareSize = DeviceInfo.wPageSpareSize;
if (enable_ecc) {
- for (i = spareFlagBytes - 1; i >= 0; i
++
)
+ for (i = spareFlagBytes - 1; i >= 0; i
--
)
data[PageSpareSize - spareFlagBytes + i] = data[i];
}
}