mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed codegen error of redo in rescue; fix #3422
The issue (and the fix) was reported by https://hackerone.com/dgaletic
This commit is contained in:
@@ -2038,7 +2038,7 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
break;
|
||||
|
||||
case NODE_REDO:
|
||||
if (!s->loop) {
|
||||
if (!s->loop || s->loop->type == LOOP_BEGIN || s->loop->type == LOOP_RESCUE) {
|
||||
raise_error(s, "unexpected redo");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user