Skip to content

Commit

Permalink
Made requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
capuanob authored and ForAllSecure Mayhem Bot committed Jan 30, 2024
1 parent fb11a72 commit 65dd957
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
14 changes: 5 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ FROM fuzzers/cargo-fuzz:0.10.0 as builder

##Install Build Dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git clang
DEBIAN_FRONTEND=noninteractive apt-get install -y clang

##ADD source code to the build stage
WORKDIR /
ADD https://api.github.com/repos/ennamarie19/miniz_oxide/git/refs/heads/mayhem version.json
RUN git clone -b mayhem https://github.com/ennamarie19/miniz_oxide.git
ADD . /miniz_oxide
WORKDIR /miniz_oxide

##Build
Expand All @@ -17,13 +16,10 @@ RUN rustup default nightly
RUN cargo install cargo-fuzz -Z no-index-update
RUN cargo fuzz build inflate_nonwrapping -Zno-index-update

##Prepare all library dependencies for copy
RUN mkdir /deps
RUN cp `ldd /miniz_oxide/fuzz/target/x86_64-unknown-linux-gnu/release/inflate_nonwrapping | grep so | sed -e '/^[^\t]/ d' | sed -e 's/\t//' | sed -e 's/.*=..//' | sed -e 's/ (0.*)//' \
| sort | uniq` /deps 2>/dev/null || :

FROM --platform=linux/amd64 ubuntu:20.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y libgcc1 libstdc++6

COPY --from=builder /miniz_oxide/fuzz/target/x86_64-unknown-linux-gnu/release/inflate_nonwrapping /inflate_nonwrapping
COPY --from=builder /deps /usr/lib

CMD ["/inflate_nonwrapping"]
1 change: 0 additions & 1 deletion Mayhemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
image: ghcr.io/ennamarie19/miniz-oxide-fuzz:latest
project: miniz-oxide
target: inflate-fuzz
testsuite:
Expand Down

0 comments on commit 65dd957

Please sign in to comment.