summaryrefslogtreecommitdiff
path: root/src
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:25:03 +1000
commit98ecb5233bb3b899bd696a90d2733c6a345676dd (patch)
tree6f3e92cf3ab5b11c868e64c0b885982d6f5edc44 /src
parent92ca3dc2e759759545c0e0adea4277b3bddb05e5 (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>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index f65359f..43a90be 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -565,7 +565,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 */
{