fix 2nd overflow in ak4114.c
Subsystems (2)
PATCH 1/1 fix 2nd overflow in ak4114.c
G'day list
I am sorry but I have done it again. The next coverity bug is in the same file and I didn't notice till I had sent out the first patch.
Anyway here is a separate patch for the second bug. After doing the first patch this one looks right, although I am not so sure this time.
Coverity found a static overflow in ak4114.c @ line 137.
The patch below limits the array usage to that allocated for it.
Signed-off-by Darren Jenkins <[email protected]>
sound/i2c/other/ak4114.c renamed from sound/i2c/other/ak4114.c.orig +2 -1
@@ -134,7 +134,8 @@ void snd_ak4114_reg_write(struct ak4114if (reg <=AK4114_REG_INT1_MASK )reg_write (chip, reg, (chip->regmap[reg] & ~mask) | val);else if (reg >=AK4114_REG_TXCSB0 && reg <=AK4114_REG_TXCSB4 ) -reg_write (chip, reg, (chip->txcsb[reg] & ~mask) | val); +reg_write (chip, reg, + (chip->txcsb[reg-AK4114_REG_TXCSB0 ] & ~mask) | val); }void snd_ak4114_reinit (struct ak4114 *chip)
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors