From: notaz Date: Sat, 19 Mar 2011 22:34:27 +0000 (+0000) Subject: input: don't use unintialized memory X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bde5dcbb2c2e10c5cf999d65295e768d027144c4;p=libpicofe.git input: don't use unintialized memory git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@922 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/linux/in_evdev.c b/linux/in_evdev.c index e6bdad1..d863c02 100644 --- a/linux/in_evdev.c +++ b/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) {