diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-09 00:39:08 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-09 00:39:08 +0900 |
| commit | 318ad9c802d010b398a9683407716b5c7ef32b00 (patch) | |
| tree | 226cd93138ab7adbc7f4a32a453e3c1bf7b9a5d9 /src | |
| parent | aa73a1068f2fd5cbff7e4623ab2036d360933ff9 (diff) | |
| download | mruby-318ad9c802d010b398a9683407716b5c7ef32b00.tar.gz mruby-318ad9c802d010b398a9683407716b5c7ef32b00.zip | |
OP_ARRAY may overflow ARG_C
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index 33df7fbf5..ed44f1792 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -708,7 +708,7 @@ gen_values(codegen_scope *s, node *t, int val) int n = 0; while (t) { - if ((intptr_t)t->car->car == NODE_SPLAT) { // splat mode + if (n >= 127 || (intptr_t)t->car->car == NODE_SPLAT) { // splat mode if (val) { pop_n(n); genop(s, MKOP_ABC(OP_ARRAY, cursp(), cursp(), n)); |
