lvgl / lv_drivers

TFT and touch pad drivers for LVGL embedded GUI library
https://docs.lvgl.io/master/porting/index.html
MIT License
291 stars 310 forks source link

indev/libinput: rescan_devices: fix malloc #221

Closed ollieparanoid closed 2 years ago

ollieparanoid commented 2 years ago

Fix missing space in malloc for path for \0 at the end of the string. The 11 bytes at the beginning are for "/dev/input/".

(Found with valgrind)

embeddedt commented 2 years ago

Thanks!

To save the next reader from repeating the counting, what do you think about adding a comment /* 11 characters for /dev/input/ + length of name + 1 NUL terminator */ above this line?

ollieparanoid commented 2 years ago

Good idea, done.

embeddedt commented 2 years ago

Merged!