Branch: Tag:

2017-11-01

2017-11-01 11:18:26 by Arne Goedeke <el@laramies.com>

push_string(): handle OOM errors correctly

make_shared_string() may throw an error in OOM situation. If that
happens here, we will end up having a corrupt svalue on the stack.

3054:      PMOD_EXPORT void push_text( const char *x )   { +  struct pike_string *s = make_shared_string(x);    struct svalue *_sp_ = Pike_sp++;    SET_SVAL_SUBTYPE(*_sp_, 0); -  _sp_->u.string=make_shared_string(x); +  _sp_->u.string=s    debug_malloc_touch(_sp_->u.string);    SET_SVAL_TYPE(*_sp_, PIKE_T_STRING);   }