Skip to content

Commit

Permalink
cve-checker.pl: verify the "Not affected versions >=" part
Browse files Browse the repository at this point in the history
As we had two errors on this.

Reported-by: Jess Lowe
Fixes #319
  • Loading branch information
bagder committed Jan 12, 2024
1 parent 17aa1a3 commit 46b88ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/CVE-2019-5435.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ AFFECTED VERSIONS
-----------------

- Affected versions: libcurl 7.62.0 to and including 7.64.1
- Not affected versions: libcurl < 7.62.0 and >= libcurl 7.65.0
- Not affected versions: libcurl < 7.62.0 and libcurl >= 7.65.0
- Introduced-in: https://github.com/curl/curl/commit/fb30ac5a2d63773c52

libcurl is used by many applications, but not always advertised as such.
Expand Down
2 changes: 1 addition & 1 deletion docs/CVE-2019-5436.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ AFFECTED VERSIONS
-----------------

- Affected versions: libcurl 7.19.4 to and including 7.64.1
- Not affected versions: libcurl < 7.19.4 and >= libcurl 7.65.0
- Not affected versions: libcurl < 7.19.4 and libcurl >= 7.65.0
- Introduced-in: https://github.com/curl/curl/commit/0516ce7786e95

libcurl is used by many applications, but not always advertised as such.
Expand Down
6 changes: 5 additions & 1 deletion docs/cve-checker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ sub checkfile {
$notaffected = 1;
}
}
elsif($l =~ /^- Not affected versions: .* < .* and .*>= /) {
elsif($l =~ /^- Not affected versions: .* < .* and .*>= (.*)/) {
$notaffected = 1;
if($1 !~ /^[1-9]/) {
print STDERR "$file:$line:error: \"not affected versions\" must specify only the version after >= ($1)\n";
return 3;
}
}
}
close(F);
Expand Down

0 comments on commit 46b88ac

Please sign in to comment.