Gilad Chaplik has uploaded a new change for review.

Change subject: engine: fixed possible int overflow in getMemSharedPercent
......................................................................

engine: fixed possible int overflow in getMemSharedPercent

- if there is system with 21TB+ shared memory the int value
will overflow when counting the percentage

Change-Id: I655a5558ff4fc7d7ad90ad5f9c4bd57ae9723838
Bug-Url: https://bugzilla.redhat.com/1093786
Signed-off-by: Jiri Moskovcak <[email protected]>
(cherry picked from commit 614fc71d30fd305826bf36cb9c208929606d9588)
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/44/30644/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
index e397e0b..86ccf4e 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
@@ -753,7 +753,7 @@
             return 0;
         }
 
-        return ((int) (shared * 100) / physical);
+        return (int) ((shared * 100) / physical);
     }
 
     /**


-- 
To view, visit http://gerrit.ovirt.org/30644
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I655a5558ff4fc7d7ad90ad5f9c4bd57ae9723838
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Jiří Moskovčák <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to