[04/10] msi: Encode the stream name before trying to open it.
Hans Leidekker
hans at codeweavers.com
Thu Feb 4 03:01:32 CST 2010
---
dlls/msi/streams.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c
index 00a4544..13dc7fa 100644
--- a/dlls/msi/streams.c
+++ b/dlls/msi/streams.c
@@ -135,7 +135,7 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
STREAM *stream;
IStream *stm;
STATSTG stat;
- LPWSTR name = NULL;
+ LPWSTR encname = NULL, name = NULL;
USHORT *data = NULL;
HRESULT hr;
ULONG count;
@@ -181,6 +181,8 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
goto done;
}
+ encname = encode_streamname(FALSE, name);
+
r = write_stream_data(sv->db->storage, name, data, count, FALSE);
if (r != ERROR_SUCCESS)
{
@@ -192,7 +194,7 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
if (!stream)
goto done;
- hr = IStorage_OpenStream(sv->db->storage, name, 0,
+ hr = IStorage_OpenStream(sv->db->storage, encname, 0,
STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream->stream);
if (FAILED(hr))
{
@@ -205,6 +207,7 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
done:
msi_free(name);
msi_free(data);
+ msi_free(encname);
IStream_Release(stm);
--
1.6.3.3
More information about the wine-patches
mailing list