qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 2/8] ui: convert the SDL2 frontend to keycodemapd


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 2/8] ui: convert the SDL2 frontend to keycodemapdb
Date: Thu, 1 Feb 2018 12:28:02 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 25/01/2018 09:32, Gerd Hoffmann wrote:
> --- a/include/ui/input.h
> +++ b/include/ui/input.h
> @@ -80,4 +80,7 @@ extern const guint16 qemu_input_map_qnum_to_qcode[];
>  extern const guint qemu_input_map_qcode_to_linux_len;
>  extern const guint16 qemu_input_map_qcode_to_linux[];

Is there any reason to use the length variables rather than just
ARRAY_SIZE()?  Coverity isn't able to see through the initializer and
incorrectly complains that

    for (i = 0 ;
         i < SDL_NUM_SCANCODES && i < qemu_input_map_usb_to_qcode_len ;
         i++) {

might access past the end of qemu_input_map_usb_to_qcode.

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]