HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba2d960
)
add underflow check in make-array
author
Andy Wingo
<wingo@pobox.com>
Sun, 2 May 2010 11:15:22 +0000
(13:15 +0200)
committer
Andy Wingo
<wingo@pobox.com>
Sun, 2 May 2010 11:15:22 +0000
(13:15 +0200)
* libguile/vm-i-scheme.c (make-array): Check for underflow before making
the array.
libguile/vm-i-scheme.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/vm-i-scheme.c
b/libguile/vm-i-scheme.c
index
d2bd435
..
fb1af11
100644
(file)
--- a/
libguile/vm-i-scheme.c
+++ b/
libguile/vm-i-scheme.c
@@
-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);