msi: Include the terminating null in the buffer size for decoded stream names.

Hans Leidekker hans at codeweavers.com
Thu Oct 2 05:17:34 CDT 2014


---
 dlls/msi/database.c | 2 +-
 dlls/msi/streams.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index b734031..e5ed16e 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -131,7 +131,7 @@ UINT msi_get_raw_stream( MSIDATABASE *db, LPCWSTR stname, IStream **stm )
 {
     HRESULT r;
     IStorage *stg;
-    WCHAR decoded[MAX_STREAM_NAME_LEN];
+    WCHAR decoded[MAX_STREAM_NAME_LEN + 1];
 
     decode_streamname( stname, decoded );
     TRACE("%s -> %s\n", debugstr_w(stname), debugstr_w(decoded));
diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c
index a20f196..b91fe88 100644
--- a/dlls/msi/streams.c
+++ b/dlls/msi/streams.c
@@ -70,7 +70,7 @@ static BOOL streams_set_table_size(MSISTREAMSVIEW *sv, UINT size)
 static STREAM *create_stream(MSISTREAMSVIEW *sv, LPCWSTR name, BOOL encoded, IStream *stm)
 {
     STREAM *stream;
-    WCHAR decoded[MAX_STREAM_NAME_LEN];
+    WCHAR decoded[MAX_STREAM_NAME_LEN + 1];
 
     stream = msi_alloc(sizeof(STREAM));
     if (!stream)
-- 
2.1.0





More information about the wine-patches mailing list