[PATCH] Ensure std::getline always 0-terminates string.

Reimar Döffinger via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 11:32:30 PST 2017


On Mon, Nov 20, 2017 at 11:02:13AM -0800, Volodymyr Sapsai wrote:
> >      catch (...)
> >      {
> > +        if (__n > 0)
> > +            *__s = char_type();
> >          this->__set_badbit_and_consider_rethrow();
> >      }
> 
> or maybe something else?

That one (note that the __set_badbit_and_consider_rethrow
will never re-throw in this case).


More information about the cfe-commits mailing list