Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa96646d authored by roel kluin's avatar roel kluin Committed by Greg Kroah-Hartman
Browse files

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e508edb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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];
	}
}