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
af628170
Commit
af628170
authored
Mar 04, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Decode stream names in load_streams.
parent
a85d23bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
streams.c
dlls/msi/streams.c
+13
-10
No files found.
dlls/msi/streams.c
View file @
af628170
...
...
@@ -425,23 +425,22 @@ static MSISTREAM *find_stream( MSIDATABASE *db, const WCHAR *name )
static
UINT
append_stream
(
MSIDATABASE
*
db
,
const
WCHAR
*
name
,
IStream
*
stream
)
{
WCHAR
decoded
[
MAX_STREAM_NAME_LEN
+
1
];
UINT
i
=
db
->
num_streams
;
if
(
!
streams_resize_table
(
db
,
db
->
num_streams
+
1
))
return
ERROR_OUTOFMEMORY
;
decode_streamname
(
name
,
decoded
);
db
->
streams
[
i
].
str_index
=
msi_add_string
(
db
->
strings
,
decoded
,
-
1
,
StringNonPersistent
);
db
->
streams
[
i
].
str_index
=
msi_add_string
(
db
->
strings
,
name
,
-
1
,
StringNonPersistent
);
db
->
streams
[
i
].
stream
=
stream
;
db
->
num_streams
++
;
TRACE
(
"added %s
\n
"
,
debugstr_w
(
decoded
));
TRACE
(
"added %s
\n
"
,
debugstr_w
(
name
));
return
ERROR_SUCCESS
;
}
static
UINT
load_streams
(
MSIDATABASE
*
db
)
{
WCHAR
decoded
[
MAX_STREAM_NAME_LEN
+
1
];
IEnumSTATSTG
*
stgenum
;
STATSTG
stat
;
HRESULT
hr
;
...
...
@@ -460,25 +459,29 @@ static UINT load_streams( MSIDATABASE *db )
break
;
/* table streams are not in the _Streams table */
if
(
stat
.
type
!=
STGTY_STREAM
||
*
stat
.
pwcsName
==
0x4840
||
find_stream
(
db
,
stat
.
pwcsName
))
if
(
stat
.
type
!=
STGTY_STREAM
||
*
stat
.
pwcsName
==
0x4840
)
{
CoTaskMemFree
(
stat
.
pwcsName
);
continue
;
}
TRACE
(
"found new stream %s
\n
"
,
debugstr_w
(
stat
.
pwcsName
));
decode_streamname
(
stat
.
pwcsName
,
decoded
);
if
(
find_stream
(
db
,
decoded
))
{
CoTaskMemFree
(
stat
.
pwcsName
);
continue
;
}
TRACE
(
"found new stream %s
\n
"
,
debugstr_w
(
decoded
));
hr
=
open_stream
(
db
,
stat
.
pwcsName
,
&
stream
);
CoTaskMemFree
(
stat
.
pwcsName
);
if
(
FAILED
(
hr
))
{
ERR
(
"unable to open stream %08x
\n
"
,
hr
);
CoTaskMemFree
(
stat
.
pwcsName
);
r
=
ERROR_FUNCTION_FAILED
;
break
;
}
r
=
append_stream
(
db
,
stat
.
pwcsName
,
stream
);
CoTaskMemFree
(
stat
.
pwcsName
);
r
=
append_stream
(
db
,
decoded
,
stream
);
if
(
r
!=
ERROR_SUCCESS
)
break
;
}
...
...
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