mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Trigger read error handling if len is <= 0.
Red Hat Bug 494245 <https://bugzilla.redhat.com/show_bug.cgi?id=494245>
Reported-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 98ecb5233b)
This commit is contained in:
@@ -564,7 +564,7 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
while (len == sizeof(ev))
|
||||
{
|
||||
len = read(pInfo->fd, &ev, sizeof(ev));
|
||||
if (len == 0)
|
||||
if (len <= 0)
|
||||
{
|
||||
if (errno == ENODEV) /* May happen after resume */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user