]> git.baikalelectronics.ru Git - kernel.git/commit
Input: hanwang - validate number of endpoints before using them
authorJohan Hovold <johan@kernel.org>
Thu, 16 Mar 2017 18:39:29 +0000 (11:39 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Mar 2017 20:56:52 +0000 (13:56 -0700)
commit0c8038f18fbdb3135449979128b9d75a316e916d
treedb3c84d288b2bbc111fcf4ccaba5d3aa79591dc5
parent6e7a85d5da6bda3dcb4ecdb2306102776156e58c
Input: hanwang - validate number of endpoints before using them

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.

Fixes: 05bd9f125063 ("Input: add support for Hanwang tablets")
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: stable@vger.kernel.org # 2.6.37
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/hanwang.c