Module: wine Branch: master Commit: dcbe0fdff23bb27e8b6fde8ee44c10a3e395b62e URL: http://source.winehq.org/git/wine.git/?a=commit;h=dcbe0fdff23bb27e8b6fde8ee4...
Author: Hans Leidekker hans@codeweavers.com Date: Thu Feb 4 10:01:32 2010 +0100
msi: Encode the stream name before trying to open it.
---
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);