From e1c1ab31a014efea98f1b9d28f13417a215fe06d Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Thu, 28 Mar 2013 11:12:56 +0100 Subject: [PATCH] extra: Fix segmentation fault in match_assign Pass correct value to sval_is_min. This is a regression (typo) introduced in ff2c958280e6 "extra: improve += and -= handling". This fix segmentation fault on parsing drivers/nfc/nfcwilink.c from linux kernel. Signed-off-by: Szymon Janc Signed-off-by: Dan Carpenter --- smatch_extra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_extra.c b/smatch_extra.c index a5b753cb..79ea0dcb 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -586,7 +586,7 @@ static void match_assign(struct expression *expr) if (get_implied_max(left, &left_max) && !sval_is_max(left_max) && get_implied_min(right, &right_min) && - !sval_is_min(left_min)) { + !sval_is_min(right_min)) { res_max = sval_binop(left_max, '-', right_min); res_max = sval_cast(right_type, res_max); } -- 2.11.4.GIT