From 4090311b77b398333c5a5ef67b867fecdc1577aa Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 19 Mar 2011 22:34:27 +0000 Subject: [PATCH] input: don't use unintialized memory git-svn-id: file:///home/notaz/opt/svn/PicoDrive@922 be3aeb3a-fb24-0410-a615-afba39da0efa --- platform/linux/in_evdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/linux/in_evdev.c b/platform/linux/in_evdev.c index e6bdad15..d863c022 100644 --- a/platform/linux/in_evdev.c +++ b/platform/linux/in_evdev.c @@ -585,10 +585,11 @@ static int in_evdev_clean_binds(void *drv_data, int *binds, int *def_binds) in_evdev_t *dev = drv_data; int i, t, ret, offs, count = 0; + memset(keybits, 0, sizeof(keybits)); ret = ioctl(dev->fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits); if (ret == -1) { perror("in_evdev: ioctl failed"); - memset(keybits, 0xff, sizeof(keybits)); /* mark all as good */ + // memset(keybits, 0xff, sizeof(keybits)); /* mark all as good */ } if (dev->abs_lzone != 0) { -- 2.39.5