From: Hans Kristian Rosbach Date: Thu, 28 Apr 2016 12:59:20 +0000 (+0200) Subject: Only run tests requiring zlib-compat if zlib-ng was compiled with it. X-Git-Tag: 1.9.9-b1~772 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6e74ebbd8cdb237fc5022807aeae1bec6865f92;p=thirdparty%2Fzlib-ng.git Only run tests requiring zlib-compat if zlib-ng was compiled with it. This also reveals that minigzip without zlib-compat is vulnerable to one or more of the tests. --- diff --git a/configure b/configure index 094462b88..de55744c6 100755 --- a/configure +++ b/configure @@ -881,6 +881,7 @@ sed < $SRCDIR/$ARCHDIR/Makefile.in " mkdir -p test TESTINCLUDES="-I$SRCDIR" if [ "$SRCDIR" != "$BUILDDIR" ]; then TESTINCLUDES="${TESTINCLUDES} -I$BUILDDIR"; fi +if test $compat -eq 1; then COMPATTESTS="compattests"; fi sed < $SRCDIR/test/Makefile.in " /^CC *=/s#=.*#=$CC# /^CFLAGS *=/s#=.*#=$CFLAGS# @@ -889,6 +890,7 @@ sed < $SRCDIR/test/Makefile.in " /^INCLUDES *=/s#=.*#=$TESTINCLUDES# /^SRCDIR *=/s#=.*#=$SRCDIR/test# /^SRCTOP *=/s#=.*#=$SRCDIR# +/^COMPATTESTS *=/s#=.*#=$COMPATTESTS# " > test/Makefile # create zlib.pc with the configure results diff --git a/test/Makefile.in b/test/Makefile.in index 9887f0f8e..1fd8c00de 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -10,7 +10,9 @@ SRCTOP= INCLUDES= TEST_LDFLAGS=-L.. ../libz.a -all: oldtests cvetests +COMPATTESTS = + +all: oldtests cvetests $(COMPATTESTS) oldtests: #set by ../configure @@ -45,7 +47,10 @@ test64: fi; \ rm -f $$TMP64 -cvetests: testCVE-2003-0107 testCVEinputs +cvetests: testCVEinputs + +# Tests requiring zlib-ng to be built with --zlib-compat +compattests: testCVE-2003-0107 testCVEinputs: @$(SRCDIR)/testCVEinputs.sh