From 47284486dfea1320aa190a71a9ef8b2676ffe0bf Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 28 Jul 2018 19:45:57 -0500 Subject: [PATCH] regress: add test for empty tuple buffer overflow issue --- Makefile.am | 1 + tests/lib1/empty-tuple.pc | 6 ++++++ tests/regress.sh | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/lib1/empty-tuple.pc diff --git a/Makefile.am b/Makefile.am index bac333f..7d7207c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -92,6 +92,7 @@ EXTRA_DIST = pkg.m4 \ tests/lib1/requires-internal-missing.pc \ tests/lib1/requires-internal-collision.pc \ tests/lib1/tuple-quoting.pc \ + tests/lib1/empty-tuple.pc \ tests/test_env.sh \ $(test_scripts) \ doc/conf.py \ diff --git a/tests/lib1/empty-tuple.pc b/tests/lib1/empty-tuple.pc new file mode 100644 index 0000000..a179495 --- /dev/null +++ b/tests/lib1/empty-tuple.pc @@ -0,0 +1,6 @@ +xcflags= + +Name: empty-tuple +Description: testing file +Version: 1 +CFlags: ${xcflags} diff --git a/tests/regress.sh b/tests/regress.sh index 0e505d3..47877d4 100755 --- a/tests/regress.sh +++ b/tests/regress.sh @@ -28,7 +28,8 @@ tests_init \ fragment_collision \ malformed_1 \ malformed_quoting \ - explicit_sysroot + explicit_sysroot \ + empty_tuple case_sensitivity_body() { @@ -247,3 +248,9 @@ explicit_sysroot_body() atf_check -o inline:"/sysroot/usr/share/test\n" \ pkgconf --with-path="${selfdir}/lib1" --variable=pkgdatadir explicit-sysroot } + +empty_tuple_body() +{ + atf_check -o inline:"\n" \ + pkgconf --with-path="${selfdir}/lib1" --cflags empty-tuple +}