Blame SOURCES/0003-Avoid-sign-extension-warnings-from-coverity.patch

1c1f09
From b608ab801c6dfd5babd224d5f8a21010ccb64b28 Mon Sep 17 00:00:00 2001
1c1f09
From: "Daniel P. Berrange" <berrange@redhat.com>
1c1f09
Date: Thu, 6 Apr 2017 17:21:29 +0100
1c1f09
Subject: [PATCH] Avoid sign extension warnings from coverity
1c1f09
1c1f09
 src/vncconnection.c:3082: sign_extension:
1c1f09
 Suspicious implicit sign extension: "height" with type "unsigned short"
1c1f09
 (16 bits, unsigned) is promoted in "rowlen * height" to type "int"
1c1f09
 (32 bits, signed), then sign-extended to type "unsigned long"
1c1f09
 (64 bits, unsigned). If "rowlen * height" is greater than 0x7FFFFFFF,
1c1f09
 the upper bits of the result will all be 1.
1c1f09
1c1f09
The 'rowlen' variable is initialization from the unsigned width
1c1f09
variable, so should have used uint instead of int.
1c1f09
1c1f09
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
1c1f09
(cherry picked from commit c3e5d23d67c9a209f127caab7843d94a91031a5f)
1c1f09
---
1c1f09
 src/vncconnection.c | 2 +-
1c1f09
 1 file changed, 1 insertion(+), 1 deletion(-)
1c1f09
1c1f09
diff --git a/src/vncconnection.c b/src/vncconnection.c
1c1f09
index 19dbfee..c55f71d 100644
1c1f09
--- a/src/vncconnection.c
1c1f09
+++ b/src/vncconnection.c
1c1f09
@@ -3064,7 +3064,7 @@ static void vnc_connection_xcursor(VncConnection *conn, guint16 x, guint16 y, gu
1c1f09
         guint8 *pixbuf = NULL;
1c1f09
         guint8 *data, *mask, *datap, *maskp;
1c1f09
         guint32 *pixp;
1c1f09
-        int rowlen;
1c1f09
+        guint rowlen;
1c1f09
         int x1, y1;
1c1f09
         guint8 fgrgb[3], bgrgb[3];
1c1f09
         guint32 fg, bg;