From b194c7a0fd2c527f81b868d3d15b660e7d0f9f4d Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 11 Apr 2024 12:56:06 +0300 Subject: [PATCH] comparison: add support for COMPARE_LIMIT I'm committing this code long after I actually made this change so I had to look up what the logic is. The comments are kind of crap... The difference between PARAM_COMPARE and COMPARE_LIMIT is PARAM_COMPARE only looks at unmodified parameters where COMPARE_LIMIT looks at the values at the end of the function as in "*offset <= length". Signed-off-by: Dan Carpenter --- smatch_comparison.c | 1 + 1 file changed, 1 insertion(+) diff --git a/smatch_comparison.c b/smatch_comparison.c index 5d35ddde..4f18a848 100644 --- a/smatch_comparison.c +++ b/smatch_comparison.c @@ -2786,6 +2786,7 @@ void register_comparison(int id) add_split_return_callback(&print_return_comparison); select_return_states_hook(PARAM_COMPARE, &db_return_comparison); + select_return_states_hook(COMPARE_LIMIT, &db_return_comparison); add_hook(&match_preop, OP_HOOK); } -- 2.11.4.GIT