You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/12/06 20:11:30 UTC

[02/11] git commit: updated refs/heads/master to afe1130

CID-1175714 casts before bit shift


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b5625c05
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b5625c05
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b5625c05

Branch: refs/heads/master
Commit: b5625c05d04c7c886192ba9c3e8ed7c0b05ea482
Parents: ea7c2d9
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue Nov 10 14:00:22 2015 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Nov 16 18:25:31 2015 +0100

----------------------------------------------------------------------
 .../rdpconsole/src/main/java/streamer/ByteBuffer.java           | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b5625c05/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/ByteBuffer.java
----------------------------------------------------------------------
diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/ByteBuffer.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/ByteBuffer.java
index e307342..46f0ee9 100644
--- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/ByteBuffer.java
+++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/ByteBuffer.java
@@ -418,7 +418,10 @@ public class ByteBuffer {
     }
 
     protected static long calculateUnsignedInt(byte value1, byte value2, byte value3, byte value4) {
-        return (calculateUnsignedByte(value1) << 24) + (calculateUnsignedByte(value2) << 16) + (calculateUnsignedByte(value3) << 8) + calculateUnsignedByte(value4);
+        return (((long)calculateUnsignedByte(value1)) << 24)
+                + (((long)calculateUnsignedByte(value2)) << 16)
+                + (((long)calculateUnsignedByte(value3)) << 8)
+                + calculateUnsignedByte(value4);
     }
 
     /**