[v3] fix libstdc++/9827

Pétur Runólfsson peturr02@ru.is
Tue Feb 25 17:27:00 GMT 2003


>        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



More information about the Libstdc++ mailing list