aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Backhouse <kevinbackhouse@github.com>2021-10-02 15:33:52 +0100
committerGitHub <noreply@github.com>2021-10-02 15:33:52 +0100
commit67b90b57ab59608fce7607661752fe5043b8be91 (patch)
tree8a402d87fd14ac9f5e85296f462e9a35a6989c22
parent77bce6c3238434e100b210dabe9a1d24cf909fa5 (diff)
downloadoss-fuzz-67b90b57ab59608fce7607661752fe5043b8be91.tar.gz
Fix false positive result due to floating point divide by zero (which is not a bug). (#6549)
-rwxr-xr-xprojects/exiv2/build.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/projects/exiv2/build.sh b/projects/exiv2/build.sh
index f08fe90aa..568d851a0 100755
--- a/projects/exiv2/build.sh
+++ b/projects/exiv2/build.sh
@@ -15,7 +15,10 @@
#
################################################################################
-pwd
+# Added to fix a false positive result: https://github.com/google/oss-fuzz/issues/6489
+CXXFLAGS="${CXXFLAGS} -fno-sanitize=float-divide-by-zero"
+
+# Build Exiv2
mkdir -p build
cd build
cmake -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_TEAM_OSS_FUZZ=ON -DLIB_FUZZING_ENGINE="${LIB_FUZZING_ENGINE}" ..