Piotr Caban : msvcp60: Fix uninitialized variable access in basic_string:: _Tidy.
Alexandre Julliard
julliard at winehq.org
Thu May 8 13:35:20 CDT 2014
Module: wine
Branch: master
Commit: ea7baf5304d7c9fa72840999b2da6adc764d5fe3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ea7baf5304d7c9fa72840999b2da6adc764d5fe3
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu May 8 13:43:42 2014 +0200
msvcp60: Fix uninitialized variable access in basic_string::_Tidy.
---
dlls/msvcp60/string.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp60/string.c b/dlls/msvcp60/string.c
index 01b535d..f1b2b8e 100644
--- a/dlls/msvcp60/string.c
+++ b/dlls/msvcp60/string.c
@@ -164,7 +164,7 @@ void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool buil
{
TRACE("(%p %d)\n", this, built);
- if(!this->ptr || !built);
+ if(!built || !this->ptr);
else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
MSVCP_allocator_char_deallocate(NULL, this->ptr-1, this->res+2);
else
@@ -1885,7 +1885,7 @@ void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool bu
{
TRACE("(%p %d)\n", this, built);
- if(!this->ptr || !built);
+ if(!built || !this->ptr);
else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
MSVCP_allocator_wchar_deallocate(NULL, this->ptr-1, this->res+2);
else
More information about the wine-cvs
mailing list