From 795aa427572e9e785b27b01fa60ddb85e9adfa45 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 1 Apr 2019 12:29:42 -0700 Subject: [PATCH] Use libonig5 - this will enable mbstring regex limits (#2282) --- projects/php/Dockerfile | 4 +++- projects/php/build.sh | 2 +- projects/php/cosmic.list | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 projects/php/cosmic.list diff --git a/projects/php/Dockerfile b/projects/php/Dockerfile index b9c5f432c..32f88b849 100644 --- a/projects/php/Dockerfile +++ b/projects/php/Dockerfile @@ -18,7 +18,9 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER stas@php.net RUN apt-get update && apt-get install -y make autoconf automake libtool bison re2c make ca-certificates curl \ xz-utils dpkg-dev file libc-dev pkg-config libcurl4-openssl-dev libedit-dev libsqlite3-dev libssl-dev \ - zlib1g-dev libonig-dev chrpath + zlib1g-dev chrpath +ADD cosmic.list /etc/apt/sources.list.d/cosmic.list +RUN apt-get update && apt-get install -y libonig5 libonig-dev RUN git clone --depth 1 --branch master https://github.com/php/php-src.git php-src RUN git clone --depth 1 https://github.com/php/php-fuzzing-sapi.git php-src/sapi/fuzzer WORKDIR php-src diff --git a/projects/php/build.sh b/projects/php/build.sh index 9b6dadd5a..a6ca5cbe4 100755 --- a/projects/php/build.sh +++ b/projects/php/build.sh @@ -17,7 +17,7 @@ mkdir -p $OUT/lib/ cp sapi/fuzzer/json.dict $OUT/php-fuzz-json.dict -cp /usr/lib/x86_64-linux-gnu/libonig.so.2 $OUT/lib/ +cp /usr/lib/x86_64-linux-gnu/libonig.so.5 $OUT/lib/ # build project ./buildconf ./configure --enable-fuzzer --enable-option-checking=fatal --disable-libxml --disable-dom \ diff --git a/projects/php/cosmic.list b/projects/php/cosmic.list new file mode 100644 index 000000000..e9f052d76 --- /dev/null +++ b/projects/php/cosmic.list @@ -0,0 +1,2 @@ +deb http://archive.ubuntu.com/ubuntu/ cosmic universe +