summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2023-08-02 13:47:25 +0200
committerGitHub <noreply@github.com>2023-08-02 13:47:25 +0200
commitb2d068d1aa95265f16670cbf5a68da745602fc12 (patch)
tree650c658f69a6bffd62f12358360e3306804820dd /data
parent7fbc4153e8e27dd8c6456eef6e5ab5b01ed83ab9 (diff)
Fix mouse-key spamming empty reports (#21663)
Problem: `mousekey_task` spams empty hid reports with when a mouse key is pressed, causing resource exhaustion in the USB mouse endpoint. Cause: The check whether or not to send a new mouse report would always evaluate to true if a mouse key is pressed: 1. `mouse_report` has non-zero fields and `tmpmr` is a copy of this fields. 2. `mouse_report` is set to zero, `tmpmr` has now non-zero fields. 3. `has_mouse_report_changed` compares the two and evaluates to true 4. a mouse report is sent. Fix: The check condition of `has_mouse_report_changed` will evaluate any empty record as unchanged, as mouse report data is relative and doesn't need to return to zero. An empty report will still be send by `register_mouse` on release of all mouse buttons.
Diffstat (limited to 'data')
0 files changed, 0 insertions, 0 deletions