Skip to content

Commit fc23c70

Browse files
committed
Fix CID 1116481 Widening should happen before calculation
1 parent b9145be commit fc23c70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/secondary-storage/server/src/org/apache/cloudstack/storage/template/DownloadManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ private String postDownload(String jobId) {
357357

358358
int imgSizeGigs = (int)Math.ceil(_storage.getSize(td.getDownloadLocalPath()) * 1.0d / (1024 * 1024 * 1024));
359359
imgSizeGigs++; // add one just in case
360-
long timeout = imgSizeGigs * installTimeoutPerGig;
360+
long timeout = (long)imgSizeGigs * installTimeoutPerGig;
361361
Script scr = null;
362362
String script = resourceType == ResourceType.TEMPLATE ? createTmpltScr : createVolScr;
363363
scr = new Script(script, timeout, s_logger);

0 commit comments

Comments
 (0)