xf86: fix flush input to work with Linux evdev devices.
So when we VT switch back and attempt to flush the input devices, we don't succeed because evdev won't return part of an event, since we were only asking for 4 bytes, we'd only get -EINVAL back. This could later cause events to be flushed that we shouldn't have gotten. This is a fix for CVE-2013-1940. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ecf6275508
commit
6ca03b9161
|
@ -421,7 +421,8 @@ xf86FlushInput(int fd)
|
|||
{
|
||||
fd_set fds;
|
||||
struct timeval timeout;
|
||||
char c[4];
|
||||
/* this needs to be big enough to flush an evdev event. */
|
||||
char c[256];
|
||||
|
||||
DebugF("FlushingSerial\n");
|
||||
if (tcflush(fd, TCIFLUSH) == 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user