提交 aa96646d 编写于 作者: R roel kluin 提交者: Greg Kroah-Hartman

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: NRoel Kluin <roel.kluin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e508edb2
......@@ -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];
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册