Xiaomi_Kernel_OpenSource icon indicating copy to clipboard operation
Xiaomi_Kernel_OpenSource copied to clipboard

Integer overflows in the led driver of the daisy-o-oss branch

Open leoaccount opened this issue 8 years ago • 0 comments

There are several suspected integer overflow bugs in drivers/leds/leds-aw2023.c, line 299 & 302 & 348 & 351. The led id may be equal to or greater than the integer length (depends on the target arch), which causes integer overflow when using the left shift operation "1 << led->id". Possible solution for this case would be to cast the integer "1" to a data type of larger length before shifting it with led->id.

leoaccount avatar Nov 18 '18 13:11 leoaccount