mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-28 16:00:22 +02:00
add underflow check in make-array
* libguile/vm-i-scheme.c (make-array): Check for underflow before making the array.
This commit is contained in:
parent
ba2d960396
commit
384dce46bf
1 changed files with 1 additions and 0 deletions
|
@ -386,6 +386,7 @@ VM_DEFINE_INSTRUCTION (163, make_array, "make-array", 3, -1, 1)
|
|||
len = (len << 8) + FETCH ();
|
||||
POP (shape);
|
||||
SYNC_REGISTER ();
|
||||
PRE_CHECK_UNDERFLOW (len);
|
||||
ret = scm_from_contiguous_array (shape, sp - len + 1, len);
|
||||
DROPN (len);
|
||||
PUSH (ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue