Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4a227c62
Commit
4a227c62
authored
Mar 02, 2024
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Multiply by 512 in dialog_vcl_add_drives().
The main motivation here is to avoid overflow, and multiplying in one place seems simpler.
parent
d7bbe884
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
dialog.c
dlls/msi/dialog.c
+3
-5
No files found.
dlls/msi/dialog.c
View file @
4a227c62
...
...
@@ -3107,14 +3107,12 @@ static LONGLONG vcl_get_cost( msi_dialog *dialog )
if
(
ERROR_SUCCESS
==
(
MSI_GetFeatureCost
(
dialog
->
package
,
feature
,
MSICOSTTREE_SELFONLY
,
INSTALLSTATE_LOCAL
,
&
each_cost
)))
{
/* each_cost is in 512-byte units */
total_cost
+=
each_cost
*
512
;
total_cost
+=
each_cost
;
}
if
(
ERROR_SUCCESS
==
(
MSI_GetFeatureCost
(
dialog
->
package
,
feature
,
MSICOSTTREE_SELFONLY
,
INSTALLSTATE_ABSENT
,
&
each_cost
)))
{
/* each_cost is in 512-byte units */
total_cost
-=
each_cost
*
512
;
total_cost
-=
each_cost
;
}
}
return
total_cost
;
...
...
@@ -3131,7 +3129,7 @@ static void dialog_vcl_add_drives( msi_dialog *dialog, struct control *control )
DWORD
size
,
flags
;
int
i
=
0
;
cost
=
vcl_get_cost
(
dialog
);
cost
=
vcl_get_cost
(
dialog
)
*
512
;
StrFormatByteSizeW
(
cost
,
cost_text
,
MAX_PATH
);
size
=
GetLogicalDriveStringsW
(
0
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment