From 97cf367965045da58f62d71b0c447769758fc8b9 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 3 Aug 2017 14:11:29 +0300 Subject: [PATCH] comparison: fix merge_comparison() for &undefined If one of the states is undefined then the merged state is undefined. Signed-off-by: Dan Carpenter --- smatch_comparison.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smatch_comparison.c b/smatch_comparison.c index 2fb6950a..0489e199 100644 --- a/smatch_comparison.c +++ b/smatch_comparison.c @@ -241,6 +241,9 @@ int merge_comparisons(int one, int two) { int LT, EQ, GT; + if (!one || !two) + return 0; + one = remove_unsigned_from_comparison(one); two = remove_unsigned_from_comparison(two); -- 2.11.4.GIT