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

This commit is contained in:
Hans Leidekker 2014-10-02 12:17:34 +02:00 committed by Alexandre Julliard
parent 013b403c58
commit f41ac94e0e
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ UINT msi_get_raw_stream( MSIDATABASE *db, LPCWSTR stname, IStream **stm )
{ {
HRESULT r; HRESULT r;
IStorage *stg; IStorage *stg;
WCHAR decoded[MAX_STREAM_NAME_LEN]; WCHAR decoded[MAX_STREAM_NAME_LEN + 1];
decode_streamname( stname, decoded ); decode_streamname( stname, decoded );
TRACE("%s -> %s\n", debugstr_w(stname), debugstr_w(decoded)); TRACE("%s -> %s\n", debugstr_w(stname), debugstr_w(decoded));

View File

@ -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) static STREAM *create_stream(MSISTREAMSVIEW *sv, LPCWSTR name, BOOL encoded, IStream *stm)
{ {
STREAM *stream; STREAM *stream;
WCHAR decoded[MAX_STREAM_NAME_LEN]; WCHAR decoded[MAX_STREAM_NAME_LEN + 1];
stream = msi_alloc(sizeof(STREAM)); stream = msi_alloc(sizeof(STREAM));
if (!stream) if (!stream)