]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Only run tests requiring zlib-compat if zlib-ng was compiled with it.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 28 Apr 2016 12:59:20 +0000 (14:59 +0200)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 28 Apr 2016 12:59:20 +0000 (14:59 +0200)
This also reveals that minigzip without zlib-compat is vulnerable
to one or more of the tests.

configure
test/Makefile.in

index 094462b8856cd00fc12ce2538f01c85e3867ded2..de55744c6f24ee907c45db82c4c8c79891ef9c0d 100755 (executable)
--- 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
index 9887f0f8e0e6bba1f9d5551f577a21251060f838..1fd8c00de63bd72099adaa389b14b716916b3a80 100644 (file)
@@ -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