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
06bf8ea2
Commit
06bf8ea2
authored
Apr 22, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Avoid creating zero-length string values in the registry.
parent
31ed6473
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
action.c
dlls/msi/action.c
+4
-2
registry.c
dlls/msi/registry.c
+5
-2
source.c
dlls/msi/source.c
+1
-1
No files found.
dlls/msi/action.c
View file @
06bf8ea2
...
...
@@ -2426,7 +2426,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
{
static
const
WCHAR
szEmpty
[]
=
{
0
};
value_data
=
(
LPSTR
)
strdupW
(
szEmpty
);
size
=
0
;
size
=
sizeof
(
szEmpty
)
;
type
=
REG_SZ
;
}
...
...
@@ -3772,8 +3772,10 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
size
=
strlenW
(
feature
->
Feature_Parent
)
*
sizeof
(
WCHAR
);
if
(
!
absent
)
{
static
const
WCHAR
emptyW
[]
=
{
0
};
size
+=
sizeof
(
WCHAR
);
RegSetValueExW
(
hukey
,
feature
->
Feature
,
0
,
REG_SZ
,
(
LPBYTE
)
feature
->
Feature_Parent
,
size
);
(
LPBYTE
)(
feature
->
Feature_Parent
?
feature
->
Feature_Parent
:
emptyW
)
,
size
);
}
else
{
...
...
dlls/msi/registry.c
View file @
06bf8ea2
...
...
@@ -381,7 +381,7 @@ DWORD msi_version_str_to_dword(LPCWSTR p)
LPWSTR
msi_version_dword_to_str
(
DWORD
version
)
{
const
WCHAR
fmt
[]
=
{
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
0
};
LPWSTR
str
=
msi_alloc
(
20
);
sprintfW
(
str
,
fmt
,
(
version
&
0xff000000
)
>>
24
,
...
...
@@ -392,7 +392,10 @@ LPWSTR msi_version_dword_to_str(DWORD version)
LONG
msi_reg_set_val_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
)
{
DWORD
len
=
value
?
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
)
:
0
;
static
const
WCHAR
emptyW
[]
=
{
0
};
DWORD
len
;
if
(
!
value
)
value
=
emptyW
;
len
=
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
);
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_SZ
,
(
const
BYTE
*
)
value
,
len
);
}
...
...
dlls/msi/source.c
View file @
06bf8ea2
...
...
@@ -822,7 +822,7 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
}
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAMEW
,
szProperty
)
==
0
)
{
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
DWORD
size
=
(
lstrlenW
(
szValue
)
+
1
)
*
sizeof
(
WCHAR
);
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAMEW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
...
...
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