Disable TIFF on fuzztest.

oss-fuzz does not support dynamic libraries so we stick to
static. But libtiff.a has undefined symbols on Ubuntu, so we
have to disable TIFF.

Change-Id: Ibd1932f5780a0af51b6b398ae6415eed8685a0be
This commit is contained in:
Vincent Rabaud 2024-07-05 11:26:12 +02:00
parent cff21a7d87
commit b78d39571f
2 changed files with 1 additions and 7 deletions

View File

@ -20,7 +20,6 @@
#include <cstdint>
#include <cstdlib>
#include <iostream>
#include <tiffio.h>
#include "imageio/image_dec.h"
#include "imageio/metadata.h"
@ -51,11 +50,6 @@ constexpr WebPInputFileFormat kUnknown = WEBP_UNSUPPORTED_FORMAT;
void Decode(std::string_view arbitrary_bytes, WebPInputFileFormat format,
bool keep_alpha, bool use_argb) {
if (format == kUnknown || format == WEBP_TIFF_FORMAT) {
TIFFSetErrorHandler(NULL); // libtiff can be verbose about errors.
TIFFSetWarningHandler(NULL); // Silence it to avoid timeouts.
}
const uint8_t *data =
reinterpret_cast<const uint8_t *>(arbitrary_bytes.data());
const size_t size = arbitrary_bytes.size();

View File

@ -47,7 +47,7 @@ EXTRA_CMAKE_FLAGS="-DFUZZTEST_COMPATIBILITY_MODE=libfuzzer"
WEBP_CFLAGS="$CFLAGS -DWEBP_MAX_IMAGE_SIZE=838860800" # 800MiB
export CFLAGS="$WEBP_CFLAGS"
cmake -S . -B build -DWEBP_BUILD_FUZZTEST=ON -DWEBP_LINK_STATIC=OFF ${EXTRA_CMAKE_FLAGS}
cmake -S . -B build -DWEBP_BUILD_FUZZTEST=ON ${EXTRA_CMAKE_FLAGS}
cd build && make -j$(nproc) && cd ..
find $SRC/libwebp-test-data -type f -size -32k -iname "*.webp" \