Control: tags -1 + patch

Hi,

the test mantest was failing, because valgrind detected
access of an unitialiized buffer.
The attached patch fixes this.

Regards,
  Reiner
diff -Nru jq-1.5+dfsg/debian/patches/gcc9.patch jq-1.5+dfsg/debian/patches/gcc9.patch
--- jq-1.5+dfsg/debian/patches/gcc9.patch	1970-01-01 01:00:00.000000000 +0100
+++ jq-1.5+dfsg/debian/patches/gcc9.patch	2019-06-08 09:56:38.000000000 +0200
@@ -0,0 +1,19 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: initialize buffers
+ The test tests/mantest was failing because valgrind noticed that
+ prog might be uninitialized when being checked in checkfail.
+Bug-Debian: https://bugs.debian.org/925722
+
+--- a/jq_test.c
++++ b/jq_test.c
+@@ -54,8 +54,8 @@
+ }
+ 
+ static void run_jq_tests(jv lib_dirs, int verbose, FILE *testdata) {
+-  char prog[4096];
+-  char buf[4096];
++  char prog[4096] = {0};
++  char buf[4096] = {0};
+   struct err_data err_msg;
+   int tests = 0, passed = 0, invalid = 0;
+   unsigned int lineno = 0;
diff -Nru jq-1.5+dfsg/debian/patches/series jq-1.5+dfsg/debian/patches/series
--- jq-1.5+dfsg/debian/patches/series	2017-01-23 17:21:05.000000000 +0100
+++ jq-1.5+dfsg/debian/patches/series	2019-06-08 09:52:28.000000000 +0200
@@ -5,3 +5,4 @@
 stack-exhaustion.patch
 heap-buffer-overflow.patch
 disable-static-libtool.patch
+gcc9.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to