libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 51/57] Fix second operand read in dwarf_eval_ex


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 51/57] Fix second operand read in dwarf_eval_expr()
Date: Fri, 21 Sep 2012 14:11:52 +0300

Due to bad bracketing, the second operand was never read for dwarf
expressions that take two operands.

Caught with sparse.
---
 src/dwarf/Gexpr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dwarf/Gexpr.c b/src/dwarf/Gexpr.c
index ef8b32a..b4f2bc9 100644
--- a/src/dwarf/Gexpr.c
+++ b/src/dwarf/Gexpr.c
@@ -254,7 +254,7 @@ do {                                                \
                                   OPND1_TYPE (operands_signature),
                                   &operand1, arg)) < 0)
            return ret;
-         if (NUM_OPERANDS (operands_signature > 1))
+         if (NUM_OPERANDS (operands_signature) > 1)
            if ((ret = read_operand (as, a, addr,
                                     OPND2_TYPE (operands_signature),
                                     &operand2, arg)) < 0)
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]