From f41ac94e0e2469e520db759835dee68e6bce944e Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Thu, 2 Oct 2014 12:17:34 +0200 Subject: [PATCH] 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 b734031bcf0..e5ed16e512f 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 a20f1961a72..b91fe8864b9 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.11.4.GIT