File size: 716 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
git clone https://gitlab.gnome.org/GNOME/libxml2.git

cd libxml2 && git checkout c7260a47f19e01f4f663b6a56fbdc2dafd8a6e7e

# set CC ..

export CFLAGS="$CFLAGS -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=unsigned-integer-overflow"
export CXXFLAGS="$CXXFLAGS -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=unsigned-integer-overflow"
export V=1


./autogen.sh \
    --disable-shared \
    --without-debug \
    --without-ftp \
    --without-http \
    --without-legacy \
    --without-python
make

cd fuzz
make clean-corpus
make fuzz.o
make xml.o

$CXX $CXXFLAGS \
    xml.o fuzz.o \
    -o libxml2_xml \
    $LIB_FUZZING_ENGINE \
    ../.libs/libxml2.a -Wl,-Bstatic -lz -llzma -Wl,-Bdynamic