Bug 173011

Summary: [drivers/media/rc/rc-main.c:ir_resize_table] rc-keymaps repeating scancode cause crash
Product: Drivers Reporter: Vick.Sun (vick.sun)
Component: OtherAssignee: drivers_other
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: >2.6 Subsystem:
Regression: No Bisected commit-id:
Attachments: can fix this issue,but not the best way

Description Vick.Sun 2016-09-28 00:55:34 UTC
Created attachment 239901 [details]
can fix this issue,but not the best way

On rc-keymaps array has repeating scancode before 1/3 of the array,
and the array size is >128 & <256,the ir_resize_table function will
cause "Index Out Of Bounds Exception" of rc_map->scan array.
Comment 1 Vick.Sun 2016-09-28 01:05:37 UTC
Steps To Reproduce:add an same same scancode in the first 1/3 of an active rc_map_table  list,you can see the event device of rc is missing and try to use any key of remote control will cause coredump.