From dcdaa88f60a043cefffdf3d9e8f4e1d49bf075b1 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 20 Oct 2011 08:09:39 +0000 Subject: [PATCH] Avoid potential overflow in range check. #273431. (Alexandre Duret-Lutz, adl@gnu.org) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12173 --- coregrind/m_debuginfo/debuginfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 106866a86f..284d667996 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -2036,7 +2036,7 @@ UWord evalCfiExpr ( XArray* exprs, Int ix, a = evalCfiExpr( exprs, e->Cex.Deref.ixAddr, eec, ok ); if (!(*ok)) return 0; if (a < eec->min_accessible - || (a + sizeof(UWord) - 1) > eec->max_accessible) { + || a > eec->max_accessible - sizeof(UWord) + 1) { *ok = False; return 0; } -- 2.47.2