Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
79ca56cd
Commit
79ca56cd
authored
Sep 13, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate fixed length buffers from the MSIFEATURE structure.
parent
d765cb96
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
action.c
dlls/msi/action.c
+12
-17
action.h
dlls/msi/action.h
+3
-5
helpers.c
dlls/msi/helpers.c
+3
-0
No files found.
dlls/msi/action.c
View file @
79ca56cd
...
...
@@ -1070,7 +1070,6 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
{
MSIPACKAGE
*
package
=
(
MSIPACKAGE
*
)
param
;
MSIFEATURE
*
feature
;
DWORD
sz
;
static
const
WCHAR
Query1
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
'_'
,
'`'
,
...
...
@@ -1090,15 +1089,11 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
list_init
(
&
feature
->
Components
);
sz
=
IDENTIFIER_SIZE
;
MSI_RecordGetStringW
(
row
,
1
,
feature
->
Feature
,
&
sz
);
feature
->
Feature
=
load_dynamic_stringW
(
row
,
1
);
TRACE
(
"Loading feature %s
\n
"
,
debugstr_w
(
feature
->
Feature
));
sz
=
IDENTIFIER_SIZE
;
if
(
!
MSI_RecordIsNull
(
row
,
2
))
MSI_RecordGetStringW
(
row
,
2
,
feature
->
Feature_Parent
,
&
sz
);
feature
->
Feature_Parent
=
load_dynamic_stringW
(
row
,
2
);
feature
->
Title
=
load_dynamic_stringW
(
row
,
3
);
feature
->
Description
=
load_dynamic_stringW
(
row
,
4
);
...
...
@@ -1106,11 +1101,7 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
feature
->
Display
=
MSI_RecordGetInteger
(
row
,
5
);
feature
->
Level
=
MSI_RecordGetInteger
(
row
,
6
);
sz
=
IDENTIFIER_SIZE
;
if
(
!
MSI_RecordIsNull
(
row
,
7
))
MSI_RecordGetStringW
(
row
,
7
,
feature
->
Directory
,
&
sz
);
feature
->
Directory
=
load_dynamic_stringW
(
row
,
7
);
feature
->
Attributes
=
MSI_RecordGetInteger
(
row
,
8
);
feature
->
Installed
=
INSTALLSTATE_ABSENT
;
...
...
@@ -3280,7 +3271,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
{
size
+=
21
;
}
if
(
feature
->
Feature_Parent
[
0
]
)
if
(
feature
->
Feature_Parent
)
size
+=
strlenW
(
feature
->
Feature_Parent
)
+
2
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
...
...
@@ -3301,7 +3292,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
strcatW
(
data
,
buf
);
}
}
if
(
feature
->
Feature_Parent
[
0
]
)
if
(
feature
->
Feature_Parent
)
{
static
const
WCHAR
sep
[]
=
{
'\2'
,
0
};
strcatW
(
data
,
sep
);
...
...
@@ -3312,18 +3303,22 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
RegSetValueExW
(
hkey
,
feature
->
Feature
,
0
,
REG_SZ
,
(
LPBYTE
)
data
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
size
=
0
;
if
(
feature
->
Feature_Parent
)
size
=
strlenW
(
feature
->
Feature_Parent
)
*
sizeof
(
WCHAR
);
if
(
!
absent
)
{
size
=
strlenW
(
feature
->
Feature_Parent
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hukey
,
feature
->
Feature
,
0
,
REG_SZ
,
(
LPBYTE
)
feature
->
Feature_Parent
,
size
);
}
else
{
size
=
(
strlenW
(
feature
->
Feature_Parent
)
+
2
)
*
sizeof
(
WCHAR
);
size
+=
2
*
sizeof
(
WCHAR
);
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
data
[
0
]
=
0x6
;
strcpyW
(
&
data
[
1
],
feature
->
Feature_Parent
);
data
[
1
]
=
0
;
if
(
feature
->
Feature_Parent
)
strcpyW
(
&
data
[
1
],
feature
->
Feature_Parent
);
RegSetValueExW
(
hukey
,
feature
->
Feature
,
0
,
REG_SZ
,
(
LPBYTE
)
data
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
...
...
dlls/msi/action.h
View file @
79ca56cd
...
...
@@ -23,18 +23,16 @@
#include "wine/list.h"
#define IDENTIFIER_SIZE 96
typedef
struct
tagMSIFEATURE
{
struct
list
entry
;
WCHAR
Feature
[
IDENTIFIER_SIZE
]
;
WCHAR
Feature_Parent
[
IDENTIFIER_SIZE
]
;
LPWSTR
Feature
;
LPWSTR
Feature_Parent
;
LPWSTR
Title
;
LPWSTR
Description
;
INT
Display
;
INT
Level
;
WCHAR
Directory
[
IDENTIFIER_SIZE
]
;
LPWSTR
Directory
;
INT
Attributes
;
INSTALLSTATE
Installed
;
...
...
dlls/msi/helpers.c
View file @
79ca56cd
...
...
@@ -438,6 +438,9 @@ static void free_feature( MSIFEATURE *feature )
list_remove
(
&
cl
->
entry
);
HeapFree
(
GetProcessHeap
(),
0
,
cl
);
}
HeapFree
(
GetProcessHeap
(),
0
,
feature
->
Feature
);
HeapFree
(
GetProcessHeap
(),
0
,
feature
->
Feature_Parent
);
HeapFree
(
GetProcessHeap
(),
0
,
feature
->
Directory
);
HeapFree
(
GetProcessHeap
(),
0
,
feature
->
Description
);
HeapFree
(
GetProcessHeap
(),
0
,
feature
->
Title
);
HeapFree
(
GetProcessHeap
(),
0
,
feature
);
...
...
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