From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: [PATCH] kvm tools: sdl -- Fix array size for keymap Date: Sun, 18 Dec 2011 22:57:21 +0400 Message-ID: <20111218185721.GV11271@moon> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sasha Levin , Asias He , Ingo Molnar , KVM-ML To: Pekka Enberg Return-path: Received: from mail-ee0-f46.google.com ([74.125.83.46]:62598 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751948Ab1LRS50 (ORCPT ); Sun, 18 Dec 2011 13:57:26 -0500 Received: by eekc4 with SMTP id c4so4793345eek.19 for ; Sun, 18 Dec 2011 10:57:25 -0800 (PST) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Index is u8 value so array size should be 256. Signed-off-by: Cyrill Gorcunov --- tools/kvm/ui/sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.git/tools/kvm/ui/sdl.c =================================================================== --- linux-2.6.git.orig/tools/kvm/ui/sdl.c +++ linux-2.6.git/tools/kvm/ui/sdl.c @@ -34,7 +34,7 @@ struct set2_scancode { .type = SCANCODE_ESCAPED,\ } -static const struct set2_scancode const keymap[255] = { +static const struct set2_scancode const keymap[256] = { [9] = DEFINE_SC(0x76), /* */ [10] = DEFINE_SC(0x16), /* 1 */ [11] = DEFINE_SC(0x1e), /* 2 */