[Spice-commits] 2 commits - configure.ac src/channel-cursor.c
Christophe Fergau
teuf at kemper.freedesktop.org
Mon Jul 17 13:25:01 UTC 2017
configure.ac | 2 +-
src/channel-cursor.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit dbe27cb7f91f3f35735116520b4dcda6666bd023
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Mon Jul 17 13:52:25 2017 +0200
cursor: Add sanity checks for hotspot x/y values
The cursor hotspot values have to be inside the cursor bounding box,
otherwise on X11 this may cause a crash of the application using
spice-gtk.
This is the client-side part of
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864998
Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/src/channel-cursor.c b/src/channel-cursor.c
index 14053a9..d7fa3df 100644
--- a/src/channel-cursor.c
+++ b/src/channel-cursor.c
@@ -405,6 +405,18 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor)
g_return_val_if_fail(scursor->data_size != 0, NULL);
+ if (hdr->hot_spot_x > hdr->width) {
+ CHANNEL_DEBUG(channel,
+ "hot spot X position (%d) is outside cursor area, capping to cursor width (%d)",
+ hdr->hot_spot_x, hdr->width);
+ hdr->hot_spot_x = hdr->width;
+ }
+ if (hdr->hot_spot_y > hdr->height) {
+ CHANNEL_DEBUG(channel,
+ "hot spot Y position (%d) is outside cursor area, capping to cursor height (%d)",
+ hdr->hot_spot_y, hdr->height);
+ hdr->hot_spot_y = hdr->height;
+ }
size = 4u * hdr->width * hdr->height;
cursor = g_malloc0(sizeof(*cursor) + size);
cursor->hdr = *hdr;
commit 20f717dac0962c2c52d0f17ba50556eb5aeffb0f
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Mon Jul 17 13:21:01 2017 +0200
build-sys: Lower gettext requirement
spice-gtk currently requires gettext 0.19 which is a fairly recent
release (not available in el7.3 and older, nor in ubuntu 14.04 LTS).
They both have a gettext newer than 0.18.2, so we can require that.
Requiring 0.18 or 0.18.1 is throwing automake errors because of our use
of -Werror, so we side-step this by requiring 0.18.2.
Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/configure.ac b/configure.ac
index 61b0120..f915d81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ AM_MAINTAINER_MODE
GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [GETTEXT package name])
-AM_GNU_GETTEXT_VERSION([0.19])
+AM_GNU_GETTEXT_VERSION([0.18.2])
AM_GNU_GETTEXT([external])
More information about the Spice-commits
mailing list