diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-27 05:57:22 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-27 05:57:22 +0900 |
| commit | 92d37403f162c6876e60247114bc982d00d14aa2 (patch) | |
| tree | de07ffc92ff02f5208b52f904aaa5b18b2711eb8 /src | |
| parent | 344946233c7070d22f0b654a191ad20b0f92a1a0 (diff) | |
| download | mruby-92d37403f162c6876e60247114bc982d00d14aa2.tar.gz mruby-92d37403f162c6876e60247114bc982d00d14aa2.zip | |
temporary protection not to access out of stack
Diffstat (limited to 'src')
| -rw-r--r-- | src/gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -563,6 +563,7 @@ root_scan_phase(mrb_state *mrb) /* mark stack */ e = mrb->stack - mrb->stbase; if (mrb->ci) e += mrb->ci->nregs; + if (mrb->stbase + e > mrb->stend) e = mrb->stend - mrb->stbase; for (i=0; i<e; i++) { mrb_gc_mark_value(mrb, mrb->stbase[i]); } |
