From e6f022e3f2fc1bdb223a98e1dfbc1e762153b8a4 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 29 Jan 2015 14:41:38 -0800 Subject: [PATCH] fix(library/match): index out of bounds --- src/library/match.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/match.cpp b/src/library/match.cpp index ad6023e7b..f1472b9c0 100644 --- a/src/library/match.cpp +++ b/src/library/match.cpp @@ -114,7 +114,7 @@ class match_fn : public match_context { optional _get_subst(level const & x) const { unsigned i = to_meta_idx(x); - if (i > m_lsubst_sz) + if (i >= m_lsubst_sz) throw_exception(); return m_lsubst[i]; }