projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e066b2
)
input-linux: fix Coverity warning
author
Gerd Hoffmann
<kraxel@redhat.com>
Wed, 16 Mar 2016 11:50:49 +0000
(12:50 +0100)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Thu, 24 Mar 2016 06:58:20 +0000
(07:58 +0100)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id:
1458129049
-12484-1-git-send-email-kraxel@redhat.com
ui/input-linux.c
patch
|
blob
|
history
diff --git
a/ui/input-linux.c
b/ui/input-linux.c
index 59d93485ec530a9e0d77bf383162959773f32635..6ddaa6740fd8aca9b906ae389ecb224913618ba4 100644
(file)
--- a/
ui/input-linux.c
+++ b/
ui/input-linux.c
@@
-213,6
+213,13
@@
static void input_linux_event_keyboard(void *opaque)
*/
continue;
}
+ if (event.code >= KEY_CNT) {
+ /*
+ * Should not happen. But better safe than sorry,
+ * and we make Coverity happy too.
+ */
+ continue;
+ }
/* keep track of key state */
if (!il->keydown[event.code] && event.value) {
il->keydown[event.code] = true;