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
efcc1ec5
Commit
efcc1ec5
authored
Sep 12, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more fixed length buffers.
parent
92167f60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
28 deletions
+19
-28
action.c
dlls/msi/action.c
+11
-24
action.h
dlls/msi/action.h
+4
-4
helpers.c
dlls/msi/helpers.c
+4
-0
No files found.
dlls/msi/action.c
View file @
efcc1ec5
...
...
@@ -969,32 +969,21 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package)
static
MSICOMPONENT
*
load_component
(
MSIRECORD
*
row
)
{
MSICOMPONENT
*
comp
;
DWORD
sz
;
comp
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MSICOMPONENT
)
);
if
(
!
comp
)
return
comp
;
/* fill in the data */
sz
=
IDENTIFIER_SIZE
;
MSI_RecordGetStringW
(
row
,
1
,
comp
->
Component
,
&
sz
);
TRACE
(
"Loading Component %s
\n
"
,
debugstr_w
(
comp
->
Component
));
comp
->
Component
=
load_dynamic_stringW
(
row
,
1
);
sz
=
0x100
;
if
(
!
MSI_RecordIsNull
(
row
,
2
))
MSI_RecordGetStringW
(
row
,
2
,
comp
->
ComponentId
,
&
sz
);
sz
=
IDENTIFIER_SIZE
;
MSI_RecordGetStringW
(
row
,
3
,
comp
->
Directory
,
&
sz
);
TRACE
(
"Loading Component %s
\n
"
,
debugstr_w
(
comp
->
Component
));
comp
->
ComponentId
=
load_dynamic_stringW
(
row
,
2
);
comp
->
Directory
=
load_dynamic_stringW
(
row
,
3
);
comp
->
Attributes
=
MSI_RecordGetInteger
(
row
,
4
);
comp
->
Condition
=
load_dynamic_stringW
(
row
,
5
);
sz
=
IDENTIFIER_SIZE
;
MSI_RecordGetStringW
(
row
,
6
,
comp
->
KeyPath
,
&
sz
);
comp
->
KeyPath
=
load_dynamic_stringW
(
row
,
6
);
comp
->
Installed
=
INSTALLSTATE_ABSENT
;
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
...
...
@@ -2264,11 +2253,9 @@ static UINT ACTION_LaunchConditions(MSIPACKAGE *package)
static
LPWSTR
resolve_keypath
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
cmp
)
{
if
(
cmp
->
KeyPath
[
0
]
==
0
)
{
LPWSTR
p
=
resolve_folder
(
package
,
cmp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
return
p
;
}
if
(
!
cmp
->
KeyPath
)
return
resolve_folder
(
package
,
cmp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
if
(
cmp
->
Attributes
&
msidbComponentAttributesRegistryKeyPath
)
{
MSIRECORD
*
row
=
0
;
...
...
@@ -2380,7 +2367,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
BOOL
write
=
FALSE
;
/* only refcount DLLs */
if
(
comp
->
KeyPath
[
0
]
==
0
||
if
(
comp
->
KeyPath
==
NULL
||
comp
->
Attributes
&
msidbComponentAttributesRegistryKeyPath
||
comp
->
Attributes
&
msidbComponentAttributesODBCDataSource
)
write
=
FALSE
;
...
...
@@ -2475,7 +2462,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
ui_progress
(
package
,
2
,
0
,
0
,
0
);
if
(
comp
->
ComponentId
[
0
]
!=
0
)
if
(
comp
->
ComponentId
)
{
WCHAR
*
keypath
=
NULL
;
MSIRECORD
*
uirow
;
...
...
@@ -3305,7 +3292,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
WCHAR
buf
[
21
];
memset
(
buf
,
0
,
sizeof
(
buf
));
if
(
component
->
ComponentId
[
0
]
)
if
(
component
->
ComponentId
)
{
TRACE
(
"From %s
\n
"
,
debugstr_w
(
component
->
ComponentId
));
CLSIDFromString
(
component
->
ComponentId
,
&
clsid
);
...
...
dlls/msi/action.h
View file @
efcc1ec5
...
...
@@ -50,12 +50,12 @@ typedef struct tagMSICOMPONENT
{
struct
list
entry
;
DWORD
magic
;
WCHAR
Component
[
IDENTIFIER_SIZE
]
;
WCHAR
ComponentId
[
IDENTIFIER_SIZE
]
;
WCHAR
Directory
[
IDENTIFIER_SIZE
]
;
LPWSTR
Component
;
LPWSTR
ComponentId
;
LPWSTR
Directory
;
INT
Attributes
;
LPWSTR
Condition
;
WCHAR
KeyPath
[
IDENTIFIER_SIZE
]
;
LPWSTR
KeyPath
;
INSTALLSTATE
Installed
;
INSTALLSTATE
ActionRequest
;
...
...
dlls/msi/helpers.c
View file @
efcc1ec5
...
...
@@ -498,7 +498,11 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
MSICOMPONENT
*
comp
=
LIST_ENTRY
(
item
,
MSICOMPONENT
,
entry
);
list_remove
(
&
comp
->
entry
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
Component
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
ComponentId
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
Directory
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
Condition
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
KeyPath
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
FullKeypath
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
);
}
...
...
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