[PATCH] msvcp60: Avoid a crash, when the ptr in basic_string_char is NULL

Piotr Caban piotr.caban at gmail.com
Thu Jan 5 05:05:38 CST 2012


Hi,

>   void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len)
>   {
> -    this->size = len;
> -    this->ptr[len] = 0;
> +    if (this->ptr) {
> +        this->size = len;
> +        this->ptr[len] = 0;
> +    }
>   }
This function should not be called if this->ptr is NULL. The bug is 
somewhere else. I'll take a look on it. Do you have a backtrace?

Piotr



More information about the wine-devel mailing list