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
af08a2f6
Commit
af08a2f6
authored
Oct 29, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Pass string length to msi_set_property in ACTION_CustomAction.
parent
52a87c90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
custom.c
dlls/msi/custom.c
+3
-2
format.c
dlls/msi/tests/format.c
+2
-2
package.c
dlls/msi/tests/package.c
+3
-3
No files found.
dlls/msi/custom.c
View file @
af08a2f6
...
...
@@ -1227,6 +1227,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
UINT
type
;
const
WCHAR
*
source
,
*
target
,
*
ptr
,
*
deferred_data
=
NULL
;
WCHAR
*
deformated
=
NULL
;
int
len
;
/* deferred action: [properties]Action */
if
((
ptr
=
strrchrW
(
action
,
']'
)))
...
...
@@ -1326,8 +1327,8 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
if
(
!
source
)
break
;
deformat_string
(
package
,
target
,
&
deformated
);
rc
=
msi_set_property
(
package
->
db
,
source
,
deformated
,
-
1
);
len
=
deformat_string
(
package
,
target
,
&
deformated
);
rc
=
msi_set_property
(
package
->
db
,
source
,
deformated
,
len
);
if
(
rc
==
ERROR_SUCCESS
&&
!
strcmpW
(
source
,
szSourceDir
))
msi_reset_folders
(
package
,
TRUE
);
msi_free
(
deformated
);
...
...
dlls/msi/tests/format.c
View file @
af08a2f6
...
...
@@ -2697,8 +2697,8 @@ static void test_formatrecord_tables(void)
memset
(
buf
,
'a'
,
sizeof
(
buf
)
);
r
=
MsiGetProperty
(
hpkg
,
"prop"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
todo_wine
ok
(
!
memcmp
(
buf
,
"
\0
np"
,
sizeof
(
"
\0
np"
)
),
"wrong value
\n
"
);
todo_wine
ok
(
size
==
sizeof
(
"
\0
np"
)
-
1
,
"got %u
\n
"
,
size
);
ok
(
!
memcmp
(
buf
,
"
\0
np"
,
sizeof
(
"
\0
np"
)
),
"wrong value
\n
"
);
ok
(
size
==
sizeof
(
"
\0
np"
)
-
1
,
"got %u
\n
"
,
size
);
r
=
MsiSetProperty
(
hpkg
,
"prop"
,
"[~]np"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot set property: %d
\n
"
,
r
);
...
...
dlls/msi/tests/package.c
View file @
af08a2f6
...
...
@@ -2316,11 +2316,11 @@ static void test_property_table(void)
memset
(
buffer
,
'a'
,
sizeof
(
buffer
)
);
r
=
MsiGetProperty
(
hpkg
,
"prop2"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
todo_wine
ok
(
!
memcmp
(
buffer
,
"
\0
np"
,
sizeof
(
"
\0
np"
)
),
"wrong value
\n
"
);
todo_wine
ok
(
sz
==
sizeof
(
"
\0
np"
)
-
1
,
"got %u
\n
"
,
sz
);
ok
(
!
memcmp
(
buffer
,
"
\0
np"
,
sizeof
(
"
\0
np"
)
),
"wrong value
\n
"
);
ok
(
sz
==
sizeof
(
"
\0
np"
)
-
1
,
"got %u
\n
"
,
sz
);
found
=
find_prop_in_property
(
hdb
,
"prop2"
,
"
\0
np"
,
3
);
todo_wine
ok
(
found
==
TRUE
,
"prop2 should be in the _Property table
\n
"
);
ok
(
found
==
TRUE
,
"prop2 should be in the _Property table
\n
"
);
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
hpkg
);
...
...
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