Hans Leidekker : msi: Include the terminating null in the buffer size for decoded stream names.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Oct 2 16:29:22 CDT 2014
Module: wine
Branch: master
Commit: f41ac94e0e2469e520db759835dee68e6bce944e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f41ac94e0e2469e520db759835dee68e6bce944e
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Oct 2 12:17:34 2014 +0200
msi: Include the terminating null in the buffer size for decoded stream names.
---
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)
More information about the wine-cvs
mailing list