[Spice-commits] src/spice-widget.c
Victor Toso de Carvalho
victortoso at kemper.freedesktop.org
Wed Feb 28 17:58:07 UTC 2018
src/spice-widget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a09ce5ec2582e81e5a9b320189e36268f3825110
Author: Victor Toso <me at victortoso.com>
Date: Wed Feb 28 18:30:21 2018 +0100
spice-widget: Avoid promoting signed 1 on shift
Address sanitizer runtime error:
> spice-widget.c:1433:12: runtime error: left shift of
> 1 by 31 places cannot be represented in type 'int'
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 316043a..1e7add4 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -1430,7 +1430,7 @@ static void send_key(SpiceDisplay *display, int scancode, SendKeyType type, gboo
i = scancode / 32;
b = scancode % 32;
- m = (1 << b);
+ m = (1u << b);
g_return_if_fail(i < SPICE_N_ELEMENTS(d->key_state));
switch (type) {
More information about the Spice-commits
mailing list