1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Avoid reading garbage from dynstack

* libguile/dynstack.c (push_dynstack_entry_unchecked): Reset top
  dynstack tag to prevent garbage.
This commit is contained in:
Andy Wingo 2017-02-12 18:02:53 +01:00
parent 710ebfddc6
commit 5048a8afbc

View file

@ -113,6 +113,7 @@ push_dynstack_entry_unchecked (scm_t_dynstack *dynstack,
SCM_DYNSTACK_SET_TAG (dynstack->top, SCM_MAKE_DYNSTACK_TAG (type, flags, len)); SCM_DYNSTACK_SET_TAG (dynstack->top, SCM_MAKE_DYNSTACK_TAG (type, flags, len));
dynstack->top += SCM_DYNSTACK_HEADER_LEN + len; dynstack->top += SCM_DYNSTACK_HEADER_LEN + len;
SCM_DYNSTACK_SET_TAG (dynstack->top, 0);
SCM_DYNSTACK_SET_PREV_OFFSET (dynstack->top, SCM_DYNSTACK_HEADER_LEN + len); SCM_DYNSTACK_SET_PREV_OFFSET (dynstack->top, SCM_DYNSTACK_HEADER_LEN + len);
return ret; return ret;