Skip to content

Commit

Permalink
fix: osv version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
b31ngd3v committed Aug 16, 2023
1 parent bb758c3 commit 0285616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cve_bin_tool/data_sources/osv_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def format_data(self, all_cve_entries):
if ranges["type"] == "SEMVER":
events = ranges["events"]

if events is None:
if events is None and "versions" in package:
versions = package["versions"]

if versions == []:
Expand All @@ -331,7 +331,7 @@ def format_data(self, all_cve_entries):
version_affected["versionEndIncluding"] = versions[-1]

affected_data.append(version_affected)
else:
elif events is not None:
introduced = None
fixed = None

Expand Down

0 comments on commit 0285616

Please sign in to comment.