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 )
...
@@ -425,23 +425,22 @@ static MSISTREAM *find_stream( MSIDATABASE *db, const WCHAR *name )
static
UINT
append_stream
(
MSIDATABASE
*
db
,
const
WCHAR
*
name
,
IStream
*
stream
)
static
UINT
append_stream
(
MSIDATABASE
*
db
,
const
WCHAR
*
name
,
IStream
*
stream
)
{
{
WCHAR
decoded
[
MAX_STREAM_NAME_LEN
+
1
];
UINT
i
=
db
->
num_streams
;
UINT
i
=
db
->
num_streams
;
if
(
!
streams_resize_table
(
db
,
db
->
num_streams
+
1
))
if
(
!
streams_resize_table
(
db
,
db
->
num_streams
+
1
))
return
ERROR_OUTOFMEMORY
;
return
ERROR_OUTOFMEMORY
;
decode_streamname
(
name
,
decoded
);
db
->
streams
[
i
].
str_index
=
msi_add_string
(
db
->
strings
,
name
,
-
1
,
StringNonPersistent
);
db
->
streams
[
i
].
str_index
=
msi_add_string
(
db
->
strings
,
decoded
,
-
1
,
StringNonPersistent
);
db
->
streams
[
i
].
stream
=
stream
;
db
->
streams
[
i
].
stream
=
stream
;
db
->
num_streams
++
;
db
->
num_streams
++
;
TRACE
(
"added %s
\n
"
,
debugstr_w
(
decoded
));
TRACE
(
"added %s
\n
"
,
debugstr_w
(
name
));
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
UINT
load_streams
(
MSIDATABASE
*
db
)
static
UINT
load_streams
(
MSIDATABASE
*
db
)
{
{
WCHAR
decoded
[
MAX_STREAM_NAME_LEN
+
1
];
IEnumSTATSTG
*
stgenum
;
IEnumSTATSTG
*
stgenum
;
STATSTG
stat
;
STATSTG
stat
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -460,25 +459,29 @@ static UINT load_streams( MSIDATABASE *db )
...
@@ -460,25 +459,29 @@ static UINT load_streams( MSIDATABASE *db )
break
;
break
;
/* table streams are not in the _Streams table */
/* table streams are not in the _Streams table */
if
(
stat
.
type
!=
STGTY_STREAM
||
*
stat
.
pwcsName
==
0x4840
||
if
(
stat
.
type
!=
STGTY_STREAM
||
*
stat
.
pwcsName
==
0x4840
)
find_stream
(
db
,
stat
.
pwcsName
))
{
{
CoTaskMemFree
(
stat
.
pwcsName
);
CoTaskMemFree
(
stat
.
pwcsName
);
continue
;
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
);
hr
=
open_stream
(
db
,
stat
.
pwcsName
,
&
stream
);
CoTaskMemFree
(
stat
.
pwcsName
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"unable to open stream %08x
\n
"
,
hr
);
ERR
(
"unable to open stream %08x
\n
"
,
hr
);
CoTaskMemFree
(
stat
.
pwcsName
);
r
=
ERROR_FUNCTION_FAILED
;
r
=
ERROR_FUNCTION_FAILED
;
break
;
break
;
}
}
r
=
append_stream
(
db
,
stat
.
pwcsName
,
stream
);
r
=
append_stream
(
db
,
decoded
,
stream
);
CoTaskMemFree
(
stat
.
pwcsName
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
break
;
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