diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-08-24 18:58:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-16 15:15:32 +0100 |
commit | 5deadfe634638b99420342950bc544547f7121dc (patch) | |
tree | 047b871a0085d1e0b970dd10e2204a6f55aa9b05 /meta/recipes-devtools/cve-check-tool/files | |
parent | b8700e9fd30317d0ad583febb4e6f385284bdd51 (diff) | |
download | openembedded-core-contrib-5deadfe634638b99420342950bc544547f7121dc.tar.gz |
cve-check-tool: Add recipe
cve-check-tool is a program for public CVEs checking.
This tool also seek to determine if a vulnerability has
been addressed by a patch.
The recipe also includes the do_populate_cve_db task
that will populate the database used by the tool.
[YOCTO #7515]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/cve-check-tool/files')
-rw-r--r-- | meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch b/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch new file mode 100644 index 0000000000..0774ad946a --- /dev/null +++ b/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch @@ -0,0 +1,51 @@ +From ce64633b9733e962b8d8482244301f614d8b5845 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 22 Aug 2016 22:54:24 -0700 +Subject: [PATCH] Check for malloc_trim before using it + +malloc_trim is gnu specific and not all libc +implement it, threfore write a configure check +to poke for it first and use the define to +guard its use. + +Helps in compiling on musl based systems + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted [https://github.com/ikeydoherty/cve-check-tool/pull/48] + configure.ac | 2 ++ + src/core.c | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d3b66ce..79c3542 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,6 +19,8 @@ m4_define([json_required_version], [0.16.0]) + m4_define([openssl_required_version],[1.0.0]) + # TODO: Set minimum sqlite + ++AC_CHECK_FUNCS_ONCE(malloc_trim) ++ + PKG_CHECK_MODULES(CVE_CHECK_TOOL, + [ + glib-2.0 >= glib_required_version, +diff --git a/src/core.c b/src/core.c +index 6263031..0d5df29 100644 +--- a/src/core.c ++++ b/src/core.c +@@ -498,9 +498,9 @@ bool cve_db_load(CveDB *self, const char *fname) + } + + b = true; +- ++#ifdef HAVE_MALLOC_TRIM + malloc_trim(0); +- ++#endif + xmlFreeTextReader(r); + if (fd) { + close(fd); +-- +2.9.3 + |