summaryrefslogtreecommitdiff
path: root/security/cvechecker/files
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2018-09-10 12:24:31 +0000
committerStefan Eßer <se@FreeBSD.org>2018-09-10 12:24:31 +0000
commitccee6bcb19d447f1fc8e54a24186ce36d51f64e4 (patch)
treefdb53ab64753221a5382b0b9fe6dcc19f0c2f255 /security/cvechecker/files
parentRegenerate with 'make makepatch'. (diff)
Upgrade to version 3.9.
Approved by: antoine (implicit)
Notes
Notes: svn path=/head/; revision=479397
Diffstat (limited to 'security/cvechecker/files')
-rw-r--r--security/cvechecker/files/patch-scripts_pullcves8
-rw-r--r--security/cvechecker/files/patch-src_cvecheck.c49
2 files changed, 4 insertions, 53 deletions
diff --git a/security/cvechecker/files/patch-scripts_pullcves b/security/cvechecker/files/patch-scripts_pullcves
index 5d867092766d..c621d84d0b61 100644
--- a/security/cvechecker/files/patch-scripts_pullcves
+++ b/security/cvechecker/files/patch-scripts_pullcves
@@ -1,4 +1,4 @@
---- scripts/pullcves.orig 2017-03-27 16:42:38 UTC
+--- scripts/pullcves.orig 2018-09-09 10:32:47 UTC
+++ scripts/pullcves
@@ -44,17 +44,11 @@ then
exit 1;
@@ -19,7 +19,7 @@
DLCVE=0;
DLDAT=0;
COMMAND=$1;
-@@ -68,7 +69,7 @@ do
+@@ -68,7 +62,7 @@ do
if [ ! -f ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml ];
then
printf "Downloading nvdcve-2.0-20${YEAR}.xml... ";
@@ -28,7 +28,7 @@
gunzip -c ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz > ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml && rm ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz;
printf "ok\nConverting nvdcve-2.0-20${YEAR}.xml to CSV... ";
xsltproc ${DATADIR}/nvdcve2simple.xsl ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml > ${CVECACHE}/nvdcve-2.0-20${YEAR}.csv;
-@@ -85,7 +86,7 @@ else
+@@ -85,7 +79,7 @@ else
CKSUM=$(cksum nvdcve-2.0-Modified.xml 2>/dev/null);
fi
printf "Downloading nvdcve-2.0-Modified.xml... ";
@@ -37,7 +37,7 @@
gunzip -c nvdcve-2.0-Modified.xml.gz > nvdcve-2.0-Modified.xml && rm nvdcve-2.0-Modified.xml.gz;
CKSUM2=$(cksum nvdcve-2.0-Modified.xml 2>/dev/null);
if [ "${CKSUM2}" != "${CKSUM}" ] || [ -f nvdcve-2.0-Modified.xml.1 ];
-@@ -113,7 +114,7 @@ fi
+@@ -113,7 +107,7 @@ fi
CKSUM=$(cksum versions.dat 2>/dev/null);
printf "Downloading versions.dat... ";
diff --git a/security/cvechecker/files/patch-src_cvecheck.c b/security/cvechecker/files/patch-src_cvecheck.c
deleted file mode 100644
index 217e2f9ef978..000000000000
--- a/security/cvechecker/files/patch-src_cvecheck.c
+++ /dev/null
@@ -1,49 +0,0 @@
---- src/cvecheck.c.orig 2017-03-27 16:42:38 UTC
-+++ src/cvecheck.c
-@@ -1170,15 +1170,11 @@ int load_watch_list(struct workstate * ws) {
- rc = delete_cpe(line, ws);
- if (rc) {
- fprintf(stderr, " ! An error occurred while interpreting CPE on line %d\n", linenum-1);
-- zero_string(line, CPELINESIZE);
-- continue;
- };
- } else {
- rc = add_cpe(line, ws);
- if (rc) {
- fprintf(stderr, " ! An error occurred while interpreting CPE on line %d\n", linenum-1);
-- zero_string(line, CPELINESIZE);
-- continue;
- };
- };
- zero_string(line, CPELINESIZE);
-@@ -1366,9 +1362,9 @@ int load_cve(struct workstate * ws) {
- fieldCounter = 0;
-
- // Split based on ':' character
-+ int invalid_line = 0;
- while (sscanf(bufferptr, "%[^:]s", field) == 1) {
- int fieldLength = swstrlen(field); // Capture field length up front as strtok_r modifies the string
--
- if (fieldCounter == 0) {
- // Should be "CVE-####-####+" (CVE identifier)
- char * sCVE;
-@@ -1431,7 +1427,8 @@ int load_cve(struct workstate * ws) {
- (strncmp(field, "/o", 2) != 0) &&
- (strncmp(field, "/h", 2) != 0) ) {
- fprintf(stderr, " ! Error while reading in CVE entries: CPE type in line %d is not one of a/o/h\n", linenum);
-- return 1;
-+ invalid_line = 1;
-+ break;
- }
- snprintf(tmpCpeId, 3, "%s", field);
-
-@@ -1463,7 +1460,8 @@ int load_cve(struct workstate * ws) {
- bufferptr = bufferptr + fieldLength + 1;
- ++fieldCounter;
- }
--
-+ if (invalid_line)
-+ continue;
- // Build the CPE up
- snprintf(cpeId, CPELINESIZE, "cpe:%s:%s:%s:%s:%s:%s:%s", tmpCpeId, tmpCpeVendor, tmpCpeProduct, tmpCpeVersion, tmpCpeUpdate, tmpCpeEdition, tmpCpeLanguage);
-