Skip to content

Commit

Permalink
poppler targets added, poppler build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
scanakci committed Mar 11, 2021
1 parent 9bce923 commit 6f02e3a
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 2 deletions.
9 changes: 9 additions & 0 deletions fuzzers/aflgo/targets/AAH043
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
JPEG2000Stream.cc:250
JPEG2000Stream.cc:251
JPEG2000Stream.cc:252
JPEG2000Stream.cc:253
JPEG2000Stream.cc:254
JPEG2000Stream.cc:255
JPEG2000Stream.cc:256
JPEG2000Stream.cc:257
JPEG2000Stream.cc:258
16 changes: 16 additions & 0 deletions fuzzers/aflgo/targets/AAH045
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HtmlOutputDev.cc:1399
HtmlOutputDev.cc:1400
HtmlOutputDev.cc:1401
HtmlOutputDev.cc:1402
HtmlOutputDev.cc:1403
HtmlOutputDev.cc:1405
HtmlOutputDev.cc:1406
HtmlOutputDev.cc:1407
ImageOutputDev.cc:358
ImageOutputDev.cc:359
ImageOutputDev.cc:360
ImageOutputDev.cc:361
ImageOutputDev.cc:362
ImageOutputDev.cc:401
ImageOutputDev.cc:402
ImageOutputDev.cc:403
8 changes: 8 additions & 0 deletions fuzzers/aflgo/targets/AAH049
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Stream.cc:625
Stream.cc:626
Stream.cc:627
Stream.cc:628
Stream.cc:629
Stream.cc:630
Stream.cc:631
Stream.cc:632
8 changes: 8 additions & 0 deletions fuzzers/aflgo/targets/AAH050
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
GfxState.cc:4683
GfxState.cc:4684
GfxState.cc:4685
GfxState.cc:4686
GfxState.cc:4687
GfxState.cc:4688
GfxState.cc:4689
GfxState.cc:4690
9 changes: 9 additions & 0 deletions fuzzers/aflgo/targets/JCH201
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
XRef.cc:1615
XRef.cc:1616
XRef.cc:1617
XRef.cc:1618
XRef.cc:1619
XRef.cc:1620
XRef.cc:1621
XRef.cc:1622
XRef.cc:1623
8 changes: 8 additions & 0 deletions fuzzers/aflgo/targets/JCH207
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Parser.cc:159
Parser.cc:160
Parser.cc:161
Parser.cc:162
Parser.cc:163
Parser.cc:164
Parser.cc:165
Parser.cc:166
7 changes: 7 additions & 0 deletions fuzzers/aflgo/targets/JCH209
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Annot.cc:5917
Annot.cc:5918
Annot.cc:5920
Annot.cc:5921
Annot.cc:5922
Annot.cc:5923
Annot.cc:5924
7 changes: 7 additions & 0 deletions fuzzers/aflgo/targets/JCH210
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
JBIG2Stream.cc:781
JBIG2Stream.cc:782
JBIG2Stream.cc:783
JBIG2Stream.cc:784
JBIG2Stream.cc:785
JBIG2Stream.cc:786
JBIG2Stream.cc:787
16 changes: 16 additions & 0 deletions fuzzers/aflgo/targets/JCH212
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Stream.cc:550
Stream.cc:551
Stream.cc:552
Stream.cc:553
Stream.cc:554
Stream.cc:555
Stream.cc:556
Stream.cc:557
Stream.cc:569
Stream.cc:570
Stream.cc:571
Stream.cc:572
Stream.cc:573
Stream.cc:574
Stream.cc:575
Stream.cc:576
5 changes: 5 additions & 0 deletions targets/poppler/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ make -j$(nproc) poppler poppler-cpp pdfimages pdftoppm
EXTRA=""

cp "$WORK/poppler/utils/"{pdfimages,pdftoppm} "$OUT/"

#TODO: modify next two lines (if AFLGO)
find $WORK -type f -name "*.bc" -exec cp -n {} $TARGET/repo \;
cp $TARGET/freetype2/builds/unix/*.bc $TARGET/repo/.

$CXX $CXXFLAGS -std=c++11 -I"$TARGET/repo/cpp" \
"$TARGET/src/pdf_fuzzer.cc" -o "$OUT/pdf_fuzzer" \
"$WORK/poppler/cpp/libpoppler-cpp.a" "$WORK/poppler/libpoppler.a" \
Expand Down
5 changes: 3 additions & 2 deletions targets/poppler/configrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PROGRAMS=(pdf_fuzzer pdfimages pdftoppm)
PROGRAMS=(pdfimages pdf_fuzzer pdftoppm)
PATCHES="JCH207"

pdfimages_ARGS="@@ /tmp/out"
pdftoppm_ARGS="-mono -cropbox @@"
pdftoppm_ARGS="-mono -cropbox @@"

0 comments on commit 6f02e3a

Please sign in to comment.