diff options
author | KarlSchimpf <karlschimpf@gmail.com> | 2017-06-23 14:13:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 14:13:04 -0700 |
commit | 9dffec8454edbc4830d764ab5b0ff6c531cfd47e (patch) | |
tree | e2f2104a9958d427693cd0e00241bc4b354d7edf /src | |
parent | f4ef7c6a363eb76528f78008fc8a0ad35936ee3e (diff) | |
download | wabt-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.cc | 5 |
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); } |