Skip to content

Commit

Permalink
cve-checker: accept a single version as affected
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Jul 18, 2024
1 parent b79b7ec commit 30e6c3c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/cve-checker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@ sub checkfile {
}
$affected = 1;
}
elsif($l =~ /^- Affected version: [^0-9]*([0-9.]+)/) {
$firstaff = $1;
$lastaff = $1;
if($firstaff ne $faff{$cve}) {
printf STDERR "$file:%d:error: Affected version mismatch with vuln.pm\n",
$secline[2];
return 1;
}
elsif($lastaff ne $laff{$cve}) {
printf STDERR "$file:%d:error: Last affected version mismatch with vuln.pm\n",
$secline[2];
return 1;
}
$affected = 1;
}
if($firstaff eq "4.0") {
# special case if existing from 4.0
if($l =~ /^- Not affected versions: .* >= /) {
Expand Down

0 comments on commit 30e6c3c

Please sign in to comment.