Add a check in the compilation-top reader.
This bug was found by fuzz testing.
This commit is contained in:
parent
f63188b4ea
commit
f400dab912
|
@ -338,6 +338,7 @@ static Scheme_Object *read_top(Scheme_Object *obj)
|
||||||
top->iso.so.type = scheme_compilation_top_type;
|
top->iso.so.type = scheme_compilation_top_type;
|
||||||
if (!SCHEME_PAIRP(obj)) return NULL;
|
if (!SCHEME_PAIRP(obj)) return NULL;
|
||||||
top->max_let_depth = SCHEME_INT_VAL(SCHEME_CAR(obj));
|
top->max_let_depth = SCHEME_INT_VAL(SCHEME_CAR(obj));
|
||||||
|
if (top->max_let_depth < 0) return NULL; /* Should this check for a max as well? */
|
||||||
obj = SCHEME_CDR(obj);
|
obj = SCHEME_CDR(obj);
|
||||||
if (!SCHEME_PAIRP(obj)) return NULL;
|
if (!SCHEME_PAIRP(obj)) return NULL;
|
||||||
top->binding_namess = SCHEME_CAR(obj); /* checking is in scheme_install_binding_names() */
|
top->binding_namess = SCHEME_CAR(obj); /* checking is in scheme_install_binding_names() */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user