Skip to content

Instantly share code, notes, and snippets.

@xen0bit
Created September 19, 2023 01:40
Show Gist options
  • Select an option

  • Save xen0bit/bfdd00680b8b83a25b4aacde8f23eb2a to your computer and use it in GitHub Desktop.

Select an option

Save xen0bit/bfdd00680b8b83a25b4aacde8f23eb2a to your computer and use it in GitHub Desktop.

Revisions

  1. xen0bit created this gist Sep 19, 2023.
    38 changes: 38 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    FROM ubuntu:rolling

    ENV DEBIAN_FRONTEND noninteractive

    RUN apt-get -y update && apt-get install -y \
    gcc \
    git \
    make \
    pkg-config \
    libipt-dev \
    libunwind8-dev \
    binutils-dev \
    libjpeg-dev \
    libpng-dev \
    libtiff-dev \
    && rm -rf /var/lib/apt/lists/* && rm -rf /honggfuzz

    RUN git clone --depth=1 https://github.com/google/honggfuzz.git

    WORKDIR /honggfuzz

    RUN make && cp /honggfuzz/honggfuzz /bin

    WORKDIR /build
    RUN git clone https://github.com/webmproject/libwebp.git
    WORKDIR /build/libwebp
    RUN git checkout v1.3.1
    RUN CC=/honggfuzz/hfuzz_cc/hfuzz-gcc CXX=/honggfuzz/hfuzz_cc/hfuzz-g++ make -f makefile.unix examples/dwebp

    WORKDIR /fuzz
    #1x1px webp
    RUN echo "UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAgA0JaQAA3AA/vuUAAA=" | base64 -d > o.webp

    WORKDIR /coverage

    ENTRYPOINT [ "/bin/bash" ]

    #honggfuzz -n`nproc` -i /fuzz -z -- /build/libwebp/examples/dwebp ___FILE___ -o /dev/null