[Spice-devel] [spice-gtk v2] Avoid to access array with negative numbers

Pavel Grunt pgrunt at redhat.com
Wed Mar 23 15:44:19 UTC 2016


On Wed, 2016-03-23 at 15:40 +0000, Frediano Ziglio wrote:

Acked-by: Pavel Grunt <pgrunt at redhat.com>

> ---
>  src/spice-widget.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Changes from v1:
> - make parameter guint as GdkEventButton::button is guint.
> 
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index 19753e7..b1a9423 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -1539,7 +1539,7 @@ static gboolean focus_out_event(GtkWidget
> *widget, GdkEventFocus *focus G_GNUC_U
>      return true;
>  }
>  
> -static int button_gdk_to_spice(int gdk)
> +static int button_gdk_to_spice(guint gdk)
>  {
>      static const int map[] = {
>          [ 1 ] = SPICE_MOUSE_BUTTON_LEFT,


More information about the Spice-devel mailing list