Skip to content

Commit ea5ca34

Browse files
authored
Add test using real files for tiff (intel#512)
1 parent 0286d78 commit ea5ca34

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

test/binaries/test-tiff-4.0.2.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
printf("This program is designed to test the cve-bin-tool checker.");
5+
printf("It outputs a few strings normally associated with libtiff 4.0.2");
6+
printf("They appear below this line.");
7+
printf("------------------");
8+
printf("LIBTIFF, Version 4.0.2");
9+
10+
return 0;
11+
}

test/test_scanner.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,21 @@ def _file_test(self, url, filename, package, version):
567567
"CVE-2016-6153",
568568
],
569569
),
570+
(
571+
"test-tiff-4.0.2.out",
572+
"tiff",
573+
"4.0.2",
574+
[
575+
# Check for known cves in this version
576+
"CVE-2018-5360",
577+
"CVE-2013-4244",
578+
"CVE-2013-4243",
579+
],
580+
[
581+
# Check to make sure an older CVE isn't included
582+
"CVE-2008-2327"
583+
],
584+
),
570585
(
571586
"test-systemd-239.out",
572587
"systemd",
@@ -976,6 +991,12 @@ def test_binaries(self, binary, package, version, are_in, not_in):
976991
"tiff",
977992
"4.0.10",
978993
),
994+
(
995+
"http://mirror.centos.org/centos/7/os/x86_64/Packages/",
996+
"libtiff-4.0.3-32.el7.x86_64.rpm",
997+
"tiff",
998+
"4.0.3",
999+
),
9791000
(
9801001
"http://rpmfind.net/linux/fedora/linux/releases/30/Everything/x86_64/os/Packages/l/",
9811002
"libxml2-2.9.9-2.fc30.x86_64.rpm",

0 commit comments

Comments
 (0)