Browse Source

regress: add test for empty tuple buffer overflow issue

William Pitcock 1 year ago
parent
commit
47284486df
3 changed files with 15 additions and 1 deletions
  1. 1
    0
      Makefile.am
  2. 6
    0
      tests/lib1/empty-tuple.pc
  3. 8
    1
      tests/regress.sh

+ 1
- 0
Makefile.am View File

@@ -92,6 +92,7 @@ EXTRA_DIST =	pkg.m4 \
92 92
 		tests/lib1/requires-internal-missing.pc \
93 93
 		tests/lib1/requires-internal-collision.pc \
94 94
 		tests/lib1/tuple-quoting.pc \
95
+		tests/lib1/empty-tuple.pc \
95 96
 		tests/test_env.sh \
96 97
 		$(test_scripts) \
97 98
 		doc/conf.py \

+ 6
- 0
tests/lib1/empty-tuple.pc View File

@@ -0,0 +1,6 @@
1
+xcflags=
2
+
3
+Name: empty-tuple
4
+Description: testing file
5
+Version: 1
6
+CFlags: ${xcflags}

+ 8
- 1
tests/regress.sh View File

@@ -28,7 +28,8 @@ tests_init \
28 28
 	fragment_collision \
29 29
 	malformed_1 \
30 30
 	malformed_quoting \
31
-	explicit_sysroot
31
+	explicit_sysroot \
32
+	empty_tuple
32 33
 
33 34
 case_sensitivity_body()
34 35
 {
@@ -247,3 +248,9 @@ explicit_sysroot_body()
247 248
 	atf_check -o inline:"/sysroot/usr/share/test\n" \
248 249
 		pkgconf --with-path="${selfdir}/lib1" --variable=pkgdatadir explicit-sysroot
249 250
 }
251
+
252
+empty_tuple_body()
253
+{
254
+	atf_check -o inline:"\n" \
255
+		pkgconf --with-path="${selfdir}/lib1" --cflags empty-tuple
256
+}