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
929d2340
Commit
929d2340
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: Return length instead of size from deformat_string.
parent
0f1d3474
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
action.c
dlls/msi/action.c
+2
-2
format.c
dlls/msi/format.c
+6
-6
No files found.
dlls/msi/action.c
View file @
929d2340
...
...
@@ -2549,7 +2549,7 @@ static LPSTR parse_value(MSIPACKAGE *package, LPCWSTR value, DWORD *type, DWORD
if
(
!
strncmpW
(
value
,
szMulti
,
3
))
ptr
=
value
+
3
;
*
size
=
deformat_string
(
package
,
ptr
,(
LPWSTR
*
)
&
data
);
*
size
=
deformat_string
(
package
,
ptr
,
(
LPWSTR
*
)
&
data
)
*
sizeof
(
WCHAR
);
/* add double NULL terminator */
if
(
*
type
==
REG_MULTI_SZ
)
...
...
@@ -4943,7 +4943,7 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
{
msi_reg_set_val_dword
(
hkey
,
szSystemComponent
,
1
);
}
size
=
deformat_string
(
package
,
modpath_fmt
,
&
buffer
);
size
=
deformat_string
(
package
,
modpath_fmt
,
&
buffer
)
*
sizeof
(
WCHAR
)
;
RegSetValueExW
(
hkey
,
szModifyPath
,
0
,
REG_EXPAND_SZ
,
(
LPBYTE
)
buffer
,
size
);
RegSetValueExW
(
hkey
,
szUninstallString
,
0
,
REG_EXPAND_SZ
,
(
LPBYTE
)
buffer
,
size
);
msi_free
(
buffer
);
...
...
dlls/msi/format.c
View file @
929d2340
...
...
@@ -1026,19 +1026,19 @@ DWORD deformat_string( MSIPACKAGE *package, const WCHAR *ptr, WCHAR **data )
{
if
(
ptr
)
{
DWORD
size
=
0
;
DWORD
len
=
0
;
MSIRECORD
*
rec
=
MSI_CreateRecord
(
1
);
MSI_RecordSetStringW
(
rec
,
0
,
ptr
);
MSI_FormatRecordW
(
package
,
rec
,
NULL
,
&
size
);
MSI_FormatRecordW
(
package
,
rec
,
NULL
,
&
len
);
size
++
;
*
data
=
msi_alloc
(
size
*
sizeof
(
WCHAR
)
);
if
(
size
>
1
)
MSI_FormatRecordW
(
package
,
rec
,
*
data
,
&
size
);
len
++
;
*
data
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
if
(
len
>
1
)
MSI_FormatRecordW
(
package
,
rec
,
*
data
,
&
len
);
else
*
data
[
0
]
=
0
;
msiobj_release
(
&
rec
->
hdr
);
return
size
*
sizeof
(
WCHAR
)
;
return
len
;
}
*
data
=
NULL
;
return
0
;
...
...
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