summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-06 10:22:25 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-06 10:44:55 +1000
commitaa58eb609617beb5d3199dab262f96003f57ab97 (patch)
tree792c983a7c0795cd6edf3d7bb93c0ba9e1832baa /src/evdev.c
parentaff7228d972eedd556b13f06d8db0b5ffb622b46 (diff)
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 98ecb5233bb3b899bd696a90d2733c6a345676dd)
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 482f7fd..3a60e7f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -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 */
{