From owner-svn-ports-head@freebsd.org Thu Oct 12 11:04:09 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29539E25BFA; Thu, 12 Oct 2017 11:04:09 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECAC871C88; Thu, 12 Oct 2017 11:04:08 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9CB48nk036192; Thu, 12 Oct 2017 11:04:08 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9CB48oG036191; Thu, 12 Oct 2017 11:04:08 GMT (envelope-from se@FreeBSD.org) Message-Id: <201710121104.v9CB48oG036191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 12 Oct 2017 11:04:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r451849 - head/security/cvechecker/files X-SVN-Group: ports-head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/security/cvechecker/files X-SVN-Commit-Revision: 451849 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2017 11:04:09 -0000 Author: se Date: Thu Oct 12 11:04:07 2017 New Revision: 451849 URL: https://svnweb.freebsd.org/changeset/ports/451849 Log: Add post release patch (will become obsolete with next release). Added: head/security/cvechecker/files/patch-src_cvecheck.c (contents, props changed) Added: head/security/cvechecker/files/patch-src_cvecheck.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/cvechecker/files/patch-src_cvecheck.c Thu Oct 12 11:04:07 2017 (r451849) @@ -0,0 +1,49 @@ +--- 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); +