summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-06-14 15:33:04 +0200
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-07-18 10:50:06 +0200
commitd4b927b3462711795dde8cd7d787b9dabbf3f3bd (patch)
treebb2a4c8a5b37ea7a6979d8c613c7c0c02a16095b /test
parent6f6bdcb47fecf7bb672fe621676354b4af3cb06b (diff)
downloadProject-Tick-d4b927b3462711795dde8cd7d787b9dabbf3f3bd.tar.gz
Project-Tick-d4b927b3462711795dde8cd7d787b9dabbf3f3bd.zip
deflate_medium: fix handling of overlapping matches
Fixes #361
Diffstat (limited to 'test')
-rw-r--r--test/GH-361/test.txt4
-rw-r--r--test/INDEX2
-rw-r--r--test/Makefile.in8
3 files changed, 13 insertions, 1 deletions
diff --git a/test/GH-361/test.txt b/test/GH-361/test.txt
new file mode 100644
index 0000000000..2b102819f4
--- /dev/null
+++ b/test/GH-361/test.txt
@@ -0,0 +1,4 @@
+.....-.u..|u....-...!..A.#?)9.._B..F..|
+00000650 fa 13 88 89 2c 1f 81 0f e4 e9 ce 39 a0 87 2e 2e |....,......9....|
+00000660 a5 0c 08 9c ec fc 88 6d 16 02 0a a0 3d fc 36 29 |.......m....=.6)|
+00000670 8d f5 c3 ba 1d 07 f4 78 e1 a0 41 f9 89 15 a5 69 |.......x..A.... \ No newline at end of file
diff --git a/test/INDEX b/test/INDEX
index f167df87e1..a1e6b72808 100644
--- a/test/INDEX
+++ b/test/INDEX
@@ -5,6 +5,8 @@ CVE-2002-0059 :
CVE-2004-0797 :
CVE-2005-1849 :
CVE-2005-2096 : test cases for the relevant CVEs
+GH-361 : test case for overlapping matches
+ https://github.com/zlib-ng/zlib-ng/issues/361
testCVEinputs.sh: script to run tests for CVEs where input data is supplied
diff --git a/test/Makefile.in b/test/Makefile.in
index 4b858f7446..caf49496db 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -14,7 +14,7 @@ COMPATTESTS =
QEMU_RUN=
QEMU_VER:=$(shell command -v $(QEMU_RUN) --version 2> /dev/null)
-all: oldtests cvetests $(COMPATTESTS) fuzzer
+all: oldtests cvetests $(COMPATTESTS) fuzzer ghtests
oldtests: #set by ../configure
check_cross_dep:
@@ -96,6 +96,12 @@ CVE-2003-0107.o: $(SRCDIR)/CVE-2003-0107.c
CVE-2003-0107$(EXE): CVE-2003-0107.o
$(CC) $(CFLAGS) -o $@ CVE-2003-0107.o $(TEST_LDFLAGS)
+.PHONY: ghtests
+ghtests: testGH-361
+
+.PHONY: testGH-361
+testGH-361:
+ $(QEMU_RUN) ../minigzip$(EXE) -4 <$(SRCDIR)/GH-361/test.txt >/dev/null
clean:
rm -f *.o *.gcda *.gcno *.gcov