guard against some cyclic lists in bytecode decoding

Closes #1098
This commit is contained in:
Matthew Flatt 2015-11-07 09:15:56 -07:00
parent 83c4a2a19c
commit 6655352789

View File

@ -6721,6 +6721,8 @@ Scheme_Scope_Set *list_to_scope_set(Scheme_Object *l, Scheme_Unmarshal_Tables *u
Scheme_Scope_Set *scopes = NULL;
Scheme_Object *r = scheme_null, *scope;
if (scheme_proper_list_length(l) < 0) return_NULL;
while (!SCHEME_NULLP(l)) {
if (!SCHEME_PAIRP(l)) return_NULL;
scopes = (Scheme_Scope_Set *)scheme_hash_get_either(ut->rns, ut->current_rns, l);
@ -6812,6 +6814,8 @@ Scheme_Object *unmarshal_multi_scopes(Scheme_Object *multi_scopes,
if (SCHEME_FALLBACKP(l))
l = SCHEME_FALLBACK_FIRST(l);
if (scheme_proper_list_length(l) < 0) return_NULL;
l_first = scheme_null;
l_last = NULL;
for (; !SCHEME_NULLP(l); l = SCHEME_CDR(l)) {