diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-01-11 11:30:52 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-01-11 11:30:52 +0900 |
| commit | 06b2e6a76c562b7a83669d0ffe7e4ac43a2636db (patch) | |
| tree | f9645a7a2f10f4ea46ce78e8fa776008f1eab61b | |
| parent | 44edc51612536a9e23dabf7c87afc3996efde027 (diff) | |
| download | mruby-06b2e6a76c562b7a83669d0ffe7e4ac43a2636db.tar.gz mruby-06b2e6a76c562b7a83669d0ffe7e4ac43a2636db.zip | |
Check if ci->target_class is NULL before dereferencing
close #3389
This issue was reported by https://hackerone.com/ston3
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1288,7 +1288,7 @@ RETRY_TRY_BLOCK: int a = GETARG_A(i); int n = GETARG_C(i); - if (mid == 0) { + if (mid == 0 || !mrb->c->ci->target_class) { mrb_value exc; exc = mrb_exc_new_str_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method"); |
