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
9f681421
Commit
9f681421
authored
Feb 19, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Encode stream name in the callers of db_get_raw_stream.
parent
d9e40b82
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
database.c
dlls/msi/database.c
+10
-13
table.c
dlls/msi/table.c
+5
-3
No files found.
dlls/msi/database.c
View file @
9f681421
...
...
@@ -125,20 +125,14 @@ static UINT clone_open_stream( MSIDATABASE *db, LPCWSTR name, IStream **stm )
UINT
db_get_raw_stream
(
MSIDATABASE
*
db
,
LPCWSTR
stname
,
IStream
**
stm
)
{
LPWSTR
encname
;
HRESULT
r
;
encname
=
encode_streamname
(
FALSE
,
stname
);
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
stname
),
debugstr_w
(
encname
));
TRACE
(
"%s
\n
"
,
debugstr_w
(
stname
));
if
(
clone_open_stream
(
db
,
encname
,
stm
)
==
ERROR_SUCCESS
)
{
msi_free
(
encname
);
if
(
clone_open_stream
(
db
,
stname
,
stm
)
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
}
r
=
IStorage_OpenStream
(
db
->
storage
,
enc
name
,
NULL
,
r
=
IStorage_OpenStream
(
db
->
storage
,
st
name
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
stm
);
if
(
FAILED
(
r
)
)
{
...
...
@@ -147,15 +141,13 @@ UINT db_get_raw_stream( MSIDATABASE *db, LPCWSTR stname, IStream **stm )
LIST_FOR_EACH_ENTRY
(
transform
,
&
db
->
transforms
,
MSITRANSFORM
,
entry
)
{
TRACE
(
"looking for %s in transform storage
\n
"
,
debugstr_w
(
stname
)
);
r
=
IStorage_OpenStream
(
transform
->
stg
,
enc
name
,
NULL
,
r
=
IStorage_OpenStream
(
transform
->
stg
,
st
name
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
stm
);
if
(
SUCCEEDED
(
r
))
break
;
}
}
msi_free
(
encname
);
if
(
SUCCEEDED
(
r
)
)
{
MSISTREAM
*
stream
;
...
...
@@ -181,10 +173,15 @@ UINT read_raw_stream_data( MSIDATABASE *db, LPCWSTR stname,
ULONG
sz
,
count
;
IStream
*
stm
=
NULL
;
STATSTG
stat
;
LPWSTR
encname
;
encname
=
encode_streamname
(
FALSE
,
stname
);
r
=
db_get_raw_stream
(
db
,
encname
,
&
stm
);
msi_free
(
encname
);
r
=
db_get_raw_stream
(
db
,
stname
,
&
stm
);
if
(
r
!=
ERROR_SUCCESS
)
return
ret
;
r
=
IStream_Stat
(
stm
,
&
stat
,
STATFLAG_NONAME
);
if
(
FAILED
(
r
)
)
{
...
...
dlls/msi/table.c
View file @
9f681421
...
...
@@ -1168,7 +1168,7 @@ static UINT TABLE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, ISt
{
MSITABLEVIEW
*
tv
=
(
MSITABLEVIEW
*
)
view
;
UINT
r
;
LPWSTR
full_name
=
NULL
;
LPWSTR
encname
,
full_name
=
NULL
;
if
(
!
view
->
ops
->
fetch_int
)
return
ERROR_INVALID_PARAMETER
;
...
...
@@ -1180,11 +1180,13 @@ static UINT TABLE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, ISt
return
r
;
}
r
=
db_get_raw_stream
(
tv
->
db
,
full_name
,
stm
);
encname
=
encode_streamname
(
FALSE
,
full_name
);
r
=
db_get_raw_stream
(
tv
->
db
,
encname
,
stm
);
if
(
r
)
ERR
(
"fetching stream %s, error = %d
\n
"
,
debugstr_w
(
full_name
),
r
);
msi_free
(
full_name
);
msi_free
(
full_name
);
msi_free
(
encname
);
return
r
;
}
...
...
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