Skip to content

Commit 874eff6

Browse files
committed
fix: Support FFmpeg versions with 'n' prefix
1 parent c071b6d commit 874eff6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cve_bin_tool/checkers/ffmpeg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ class FfmpegChecker(Checker):
2323
FILENAME_PATTERNS = [r"ffmpeg"]
2424
VERSION_PATTERNS = [
2525
r"%s version ([0-9]+\.[0-9]+\.[0-9]+)[a-zA-Z0-9 \(\)%~\-\r\n]*(?:avutil|FFmpeg)",
26-
r"FFmpeg version ([0-9]+\.[0-9]+\.[0-9]+)",
26+
r"FFmpeg version n?([0-9]+\.[0-9]+\.[0-9]+)",
2727
]
2828
VENDOR_PRODUCT = [("ffmpeg", "ffmpeg")]

test/test_data/ffmpeg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"version": "3.4.9",
2323
"version_strings": ["FFmpeg version 3.4.9"],
2424
},
25+
{
26+
"product": "ffmpeg",
27+
"version": "4.3.1",
28+
"version_strings": ["FFmpeg version n4.3.1"],
29+
},
2530
]
2631
package_test_data = [
2732
{

0 commit comments

Comments
 (0)