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)
...
@@ -969,32 +969,21 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package)
static
MSICOMPONENT
*
load_component
(
MSIRECORD
*
row
)
static
MSICOMPONENT
*
load_component
(
MSIRECORD
*
row
)
{
{
MSICOMPONENT
*
comp
;
MSICOMPONENT
*
comp
;
DWORD
sz
;
comp
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MSICOMPONENT
)
);
comp
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MSICOMPONENT
)
);
if
(
!
comp
)
if
(
!
comp
)
return
comp
;
return
comp
;
/* fill in the data */
/* fill in the data */
sz
=
IDENTIFIER_SIZE
;
comp
->
Component
=
load_dynamic_stringW
(
row
,
1
);
MSI_RecordGetStringW
(
row
,
1
,
comp
->
Component
,
&
sz
);
TRACE
(
"Loading Component %s
\n
"
,
debugstr_w
(
comp
->
Component
));
sz
=
0x100
;
TRACE
(
"Loading Component %s
\n
"
,
debugstr_w
(
comp
->
Component
));
if
(
!
MSI_RecordIsNull
(
row
,
2
))
MSI_RecordGetStringW
(
row
,
2
,
comp
->
ComponentId
,
&
sz
);
sz
=
IDENTIFIER_SIZE
;
MSI_RecordGetStringW
(
row
,
3
,
comp
->
Directory
,
&
sz
);
comp
->
ComponentId
=
load_dynamic_stringW
(
row
,
2
);
comp
->
Directory
=
load_dynamic_stringW
(
row
,
3
);
comp
->
Attributes
=
MSI_RecordGetInteger
(
row
,
4
);
comp
->
Attributes
=
MSI_RecordGetInteger
(
row
,
4
);
comp
->
Condition
=
load_dynamic_stringW
(
row
,
5
);
comp
->
Condition
=
load_dynamic_stringW
(
row
,
5
);
comp
->
KeyPath
=
load_dynamic_stringW
(
row
,
6
);
sz
=
IDENTIFIER_SIZE
;
MSI_RecordGetStringW
(
row
,
6
,
comp
->
KeyPath
,
&
sz
);
comp
->
Installed
=
INSTALLSTATE_ABSENT
;
comp
->
Installed
=
INSTALLSTATE_ABSENT
;
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
...
@@ -2264,11 +2253,9 @@ static UINT ACTION_LaunchConditions(MSIPACKAGE *package)
...
@@ -2264,11 +2253,9 @@ static UINT ACTION_LaunchConditions(MSIPACKAGE *package)
static
LPWSTR
resolve_keypath
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
cmp
)
static
LPWSTR
resolve_keypath
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
cmp
)
{
{
if
(
cmp
->
KeyPath
[
0
]
==
0
)
if
(
!
cmp
->
KeyPath
)
{
return
resolve_folder
(
package
,
cmp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
LPWSTR
p
=
resolve_folder
(
package
,
cmp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
return
p
;
}
if
(
cmp
->
Attributes
&
msidbComponentAttributesRegistryKeyPath
)
if
(
cmp
->
Attributes
&
msidbComponentAttributesRegistryKeyPath
)
{
{
MSIRECORD
*
row
=
0
;
MSIRECORD
*
row
=
0
;
...
@@ -2380,7 +2367,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
...
@@ -2380,7 +2367,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
BOOL
write
=
FALSE
;
BOOL
write
=
FALSE
;
/* only refcount DLLs */
/* only refcount DLLs */
if
(
comp
->
KeyPath
[
0
]
==
0
||
if
(
comp
->
KeyPath
==
NULL
||
comp
->
Attributes
&
msidbComponentAttributesRegistryKeyPath
||
comp
->
Attributes
&
msidbComponentAttributesRegistryKeyPath
||
comp
->
Attributes
&
msidbComponentAttributesODBCDataSource
)
comp
->
Attributes
&
msidbComponentAttributesODBCDataSource
)
write
=
FALSE
;
write
=
FALSE
;
...
@@ -2475,7 +2462,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
...
@@ -2475,7 +2462,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
{
ui_progress
(
package
,
2
,
0
,
0
,
0
);
ui_progress
(
package
,
2
,
0
,
0
,
0
);
if
(
comp
->
ComponentId
[
0
]
!=
0
)
if
(
comp
->
ComponentId
)
{
{
WCHAR
*
keypath
=
NULL
;
WCHAR
*
keypath
=
NULL
;
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
...
@@ -3305,7 +3292,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
...
@@ -3305,7 +3292,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
WCHAR
buf
[
21
];
WCHAR
buf
[
21
];
memset
(
buf
,
0
,
sizeof
(
buf
));
memset
(
buf
,
0
,
sizeof
(
buf
));
if
(
component
->
ComponentId
[
0
]
)
if
(
component
->
ComponentId
)
{
{
TRACE
(
"From %s
\n
"
,
debugstr_w
(
component
->
ComponentId
));
TRACE
(
"From %s
\n
"
,
debugstr_w
(
component
->
ComponentId
));
CLSIDFromString
(
component
->
ComponentId
,
&
clsid
);
CLSIDFromString
(
component
->
ComponentId
,
&
clsid
);
...
...
dlls/msi/action.h
View file @
efcc1ec5
...
@@ -50,12 +50,12 @@ typedef struct tagMSICOMPONENT
...
@@ -50,12 +50,12 @@ typedef struct tagMSICOMPONENT
{
{
struct
list
entry
;
struct
list
entry
;
DWORD
magic
;
DWORD
magic
;
WCHAR
Component
[
IDENTIFIER_SIZE
]
;
LPWSTR
Component
;
WCHAR
ComponentId
[
IDENTIFIER_SIZE
]
;
LPWSTR
ComponentId
;
WCHAR
Directory
[
IDENTIFIER_SIZE
]
;
LPWSTR
Directory
;
INT
Attributes
;
INT
Attributes
;
LPWSTR
Condition
;
LPWSTR
Condition
;
WCHAR
KeyPath
[
IDENTIFIER_SIZE
]
;
LPWSTR
KeyPath
;
INSTALLSTATE
Installed
;
INSTALLSTATE
Installed
;
INSTALLSTATE
ActionRequest
;
INSTALLSTATE
ActionRequest
;
...
...
dlls/msi/helpers.c
View file @
efcc1ec5
...
@@ -498,7 +498,11 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
...
@@ -498,7 +498,11 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
MSICOMPONENT
*
comp
=
LIST_ENTRY
(
item
,
MSICOMPONENT
,
entry
);
MSICOMPONENT
*
comp
=
LIST_ENTRY
(
item
,
MSICOMPONENT
,
entry
);
list_remove
(
&
comp
->
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
->
Condition
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
KeyPath
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
FullKeypath
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
->
FullKeypath
);
HeapFree
(
GetProcessHeap
(),
0
,
comp
);
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