Unverified Commit 6583a650 by Christian Brauner Committed by GitHub

Merge pull request #3737 from evverx/oss-fuzz-fixes

oss-fuzz: a few follow-up commits
parents 647d0e01 98f9e64d
...@@ -14,6 +14,8 @@ CI (Linux) | Jenkins | [![Build Status](https://jenkins.linux ...@@ -14,6 +14,8 @@ CI (Linux) | Jenkins | [![Build Status](https://jenkins.linux
CI (Linux) | Travis | [![Build Status](https://travis-ci.org/lxc/lxc.svg?branch=master)](https://travis-ci.org/lxc/lxc/) CI (Linux) | Travis | [![Build Status](https://travis-ci.org/lxc/lxc.svg?branch=master)](https://travis-ci.org/lxc/lxc/)
Project status | CII Best Practices | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1087/badge)](https://bestpractices.coreinfrastructure.org/projects/1087) Project status | CII Best Practices | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1087/badge)](https://bestpractices.coreinfrastructure.org/projects/1087)
Code Quality | LGTM | [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/lxc/lxc.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/lxc/lxc/context:cpp) Code Quality | LGTM | [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/lxc/lxc.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/lxc/lxc/context:cpp)
Fuzzing | OSS-Fuzz | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/lxc.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#lxc)
Fuzzing | CIFuzz | [![CIFuzz](https://github.com/lxc/lxc/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/lxc/lxc/actions/workflows/cifuzz.yml)
## System Containers ## System Containers
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
int fd = -1; int fd = -1;
char tmpf[] = "fuzz-lxc-config-read-XXXXXX"; char tmpf[] = "/tmp/fuzz-lxc-config-read-XXXXXX";
struct lxc_conf *conf = NULL; struct lxc_conf *conf = NULL;
fd = lxc_make_tmpfile(tmpf, false); fd = lxc_make_tmpfile(tmpf, false);
......
...@@ -43,4 +43,6 @@ make -j$(nproc) ...@@ -43,4 +43,6 @@ make -j$(nproc)
$CC -c -o fuzz-lxc-config-read.o $CFLAGS -Isrc -Isrc/lxc src/tests/fuzz-lxc-config-read.c $CC -c -o fuzz-lxc-config-read.o $CFLAGS -Isrc -Isrc/lxc src/tests/fuzz-lxc-config-read.c
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE fuzz-lxc-config-read.o src/lxc/.libs/liblxc.a -o $OUT/fuzz-lxc-config-read $CXX $CXXFLAGS $LIB_FUZZING_ENGINE fuzz-lxc-config-read.o src/lxc/.libs/liblxc.a -o $OUT/fuzz-lxc-config-read
perl -lne 'if (/config_jump_table\[\]\s*=/../^}/) { /"([^"]+)"/ && print "$1=" }' src/lxc/confile.c >doc/examples/all-keys.conf
[[ -s doc/examples/all-keys.conf ]]
zip -r $OUT/fuzz-lxc-config-read_seed_corpus.zip doc/examples zip -r $OUT/fuzz-lxc-config-read_seed_corpus.zip doc/examples
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment