This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [v3] fix libstdc++/9827


>        ostreambuf_iterator& 
>        _M_put(const _CharT* __ws, streamsize __len)
>        {
> -	this->_M_sbuf->sputn(__ws, __len);
> +	if (this->_M_sbuf->sputn(__ws, __len) != __len)
> +	  _M_failed = true;
>  	return *this;
>        }

I believe there is still a problem here: You should only call sputn
if failed() returns false.

Petur


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]