diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2024-08-27 11:01:06 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2024-08-27 11:11:22 +1000 |
commit | a5af26c654b4da5fd5eaaeaa2173c734ab9e63ec (patch) | |
tree | f0c35866a425fba205ae13ab8e9eb522da308ce8 /COPYING | |
parent | dabce4dbe5eab35076e31fd0a628cbe11b858fa1 (diff) |
XGetFeedbackControl: skip over unknown feedback controls
If the server sends an unknown feedback control class we would allocate
the amount of *protocol* bytes for the client representation but then
later mess up the actual composition of the classes due to
Feedback->length never being initialized.
So while in theory it looks like this:
|-------------- allocated size -----------------|
[led feedback] [ ?unknown? ] [kbd feedback][....]
with unknown being the size of the class on the protocol,
in practice it looks like this:
|-------------- allocated size -----------------|
[led feedback] [ ?unknown? ] [kbd feedback][...]
with unknown being the size of whatever was in the Feeback->length
pointed to at the time. The content of unknown is never initialized.
Fix this by making unknown classes disappear so the above becomes:
|------- allocated size ---------|
[led feedback][kbd feedback][....]
Closes #16
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxi/-/merge_requests/18>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions