mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
staging: spectra: don't read past array in Conv_Spare_Data_Log2Phy_Format()
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>
This commit is contained in:
parent
e508edb203
commit
aa96646daa
@ -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];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user