From 95e153d6ba2aea84ad6fffd17a90ba5d745cfab5 Mon Sep 17 00:00:00 2001 From: Mukul Kolpe Date: Thu, 27 Jun 2024 08:07:38 +0530 Subject: [PATCH] Added length check on bugs_by_version for specific version_number --- slither/detectors/attributes/incorrect_solc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py index 532a96493..e60412cef 100644 --- a/slither/detectors/attributes/incorrect_solc.py +++ b/slither/detectors/attributes/incorrect_solc.py @@ -71,7 +71,7 @@ def _check_version(self, version: Tuple[str, str, str, str, str]) -> Optional[st if op and op not in [">", ">=", "^"]: return self.LESS_THAN_TXT version_number = ".".join(version[2:]) - if version_number in bugs_by_version: + if version_number in bugs_by_version and len(bugs_by_version[version_number]): bugs = "\n".join([f"\t- {bug}" for bug in bugs_by_version[version_number]]) return self.BUGGY_VERSION_TXT + f"\n{bugs}" return None