The get_next_str function of smdb.py does not understand ranges that have flags in square brackets. This results in a range such as "0,4096-18446744073709547520[c]" being interpreted as 0->0 and 4096->0. Let's fix this by breaking when we reach an opening square bracket. Signed-off-by: Andrew Murray <andrew.murray@xxxxxxx> --- smatch_data/db/smdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_data/db/smdb.py b/smatch_data/db/smdb.py index c0b310b13b1d..1e089b4804bd 100755 --- a/smatch_data/db/smdb.py +++ b/smatch_data/db/smdb.py @@ -267,7 +267,7 @@ def get_next_str(txt): if txt[0] == '-': parsed += 1 for char in txt[parsed:]: - if char == '-': + if char == '-' or char == '[': break parsed += 1 val = txt[:parsed] -- 2.21.0