summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarlSchimpf <karlschimpf@gmail.com>2017-06-23 14:13:04 -0700
committerGitHub <noreply@github.com>2017-06-23 14:13:04 -0700
commit9dffec8454edbc4830d764ab5b0ff6c531cfd47e (patch)
treee2f2104a9958d427693cd0e00241bc4b354d7edf /src
parentf4ef7c6a363eb76528f78008fc8a0ad35936ee3e (diff)
downloadwabt-9dffec8454edbc4830d764ab5b0ff6c531cfd47e.tar.gz
wabt-9dffec8454edbc4830d764ab5b0ff6c531cfd47e.tar.bz2
wabt-9dffec8454edbc4830d764ab5b0ff6c531cfd47e.zip
Fix dereference of null pointer in validator. (#523)
* Fix null pointer dereference. * Test all exception test outputs using -v option. * Check more test file outputs.
Diffstat (limited to 'src')
-rw-r--r--src/validator.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/validator.cc b/src/validator.cc
index d413838a..750cd5b7 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -597,8 +597,9 @@ void Validator::CheckExpr(const Expr* expr) {
if (found_catch_all)
PrintError(&catch_->loc, "Appears after catch all block");
const Exception* except = nullptr;
- CheckExceptVar(&catch_->var, &except);
- typechecker_.OnCatch(&except->sig);
+ if (WABT_SUCCEEDED(CheckExceptVar(&catch_->var, &except))) {
+ typechecker_.OnCatch(&except->sig);
+ }
}
CheckExprList(&catch_->loc, catch_->first);
}