mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
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:
parent
cff21a7d87
commit
b78d39571f
@ -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();
|
||||
|
@ -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" \
|
||||
|
Loading…
Reference in New Issue
Block a user