Module: wine Branch: master Commit: 59514c463a6498a7a0b871a1ef193e40c1b6843f URL: http://source.winehq.org/git/wine.git/?a=commit;h=59514c463a6498a7a0b871a1ef...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Oct 18 11:13:52 2011 +0200
msvcp90: Fix buffer size in basic_string_char_grow.
---
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