From b3b4a5c3a32a0b9376a5e0fcf1ea813d43d074b4 Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Mon, 1 Apr 2019 18:15:21 +0200 Subject: [PATCH] [tesseract-ocr] Add fuzzer that processes 512x512 images (#2279) --- projects/tesseract-ocr/build.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/projects/tesseract-ocr/build.sh b/projects/tesseract-ocr/build.sh index 8e84543c5..c93cc4f10 100755 --- a/projects/tesseract-ocr/build.sh +++ b/projects/tesseract-ocr/build.sh @@ -46,3 +46,21 @@ $CXX $CXXFLAGS \ /usr/lib/x86_64-linux-gnu/liblzma.a \ -lz \ -lFuzzingEngine + +$CXX $CXXFLAGS \ + -DTESSERACT_FUZZER_WIDTH=512 \ + -DTESSERACT_FUZZER_HEIGHT=512 \ + -I $SRC/tesseract/src/api \ + -I $SRC/tesseract/src/ccstruct \ + -I $SRC/tesseract/src/ccmain \ + -I $SRC/tesseract/src/ccutil \ + $SRC/tesseract-ocr-fuzzers/fuzzer-api.cpp -o $OUT/fuzzer-api-512x512 \ + $SRC/tesseract/src/api/.libs/libtesseract.a \ + /usr/local/lib/liblept.a \ + /usr/lib/x86_64-linux-gnu/libtiff.a \ + /usr/lib/x86_64-linux-gnu/libpng.a \ + /usr/lib/x86_64-linux-gnu/libjpeg.a \ + /usr/lib/x86_64-linux-gnu/libjbig.a \ + /usr/lib/x86_64-linux-gnu/liblzma.a \ + -lz \ + -lFuzzingEngine