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
0cd708e7
Commit
0cd708e7
authored
Jul 02, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: pcchValue represents the length of szValue in TCHARS, not bytes.
parent
4d668e06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
source.c
dlls/msi/source.c
+14
-2
source.c
dlls/msi/tests/source.c
+1
-4
No files found.
dlls/msi/source.c
View file @
0cd708e7
...
...
@@ -184,6 +184,7 @@ UINT WINAPI MsiSourceListGetInfoA( LPCSTR szProduct, LPCSTR szUserSid,
if
(
!
value
)
return
ERROR_OUTOFMEMORY
;
*
value
=
'\0'
;
ret
=
MsiSourceListGetInfoW
(
product
,
usersid
,
dwContext
,
dwOptions
,
property
,
value
,
&
len
);
if
(
ret
!=
ERROR_SUCCESS
)
...
...
@@ -341,10 +342,21 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
}
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAMEW
,
szProperty
)
==
0
)
{
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAMEW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
*
pcchValue
=
*
pcchValue
*
sizeof
(
WCHAR
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAMEW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
{
*
pcchValue
=
0
;
rc
=
ERROR_SUCCESS
;
}
else
{
if
(
*
pcchValue
)
*
pcchValue
=
(
*
pcchValue
-
1
)
/
sizeof
(
WCHAR
);
if
(
szValue
)
szValue
[
*
pcchValue
]
=
'\0'
;
}
}
else
{
...
...
dlls/msi/tests/source.c
View file @
0cd708e7
...
...
@@ -209,10 +209,7 @@ static void test_MsiSourceListGetInfo(void)
r
=
MsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
size
==
0
,
"Expected 0, got %d
\n
"
,
size
);
}
ok
(
size
==
0
,
"Expected 0, got %d
\n
"
,
size
);
data
=
"msitest.msi"
;
res
=
RegSetValueExA
(
hkey
,
"PackageName"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
...
...
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