From: Piotr Caban Subject: [PATCH 6/8] msvcp90: Fix buffer size in basic_string_char_grow Message-Id: <4E9D4350.10700@codeweavers.com> Date: Tue, 18 Oct 2011 11:13:52 +0200 --- dlls/msvcp90/string.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index c2aa0da..c480af1 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -607,7 +607,7 @@ MSVCP_bool __thiscall basic_string_char_grow( if(new_res/3 < this->res/2) new_res = this->res + this->res/2; - ptr = MSVCP_allocator_char_allocate(this->allocator, new_res); + ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+1); if(!ptr) ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+1); else @@ -2271,7 +2271,7 @@ MSVCP_bool __thiscall basic_string_wchar_grow( if(new_res/3 < this->res/2) new_res = this->res + this->res/2; - ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res); + ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+1); if(!ptr) ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+1); else