Control: tags 869220 + pending
Control: tags 886872 + patch
Control: tags 886872 + pending

Dear maintainer,

I've prepared an NMU for agrep (versioned as 4.17-9.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.
  Reiner
diff -Nru agrep-4.17/debian/changelog agrep-4.17/debian/changelog
--- agrep-4.17/debian/changelog	2012-04-10 23:09:20.000000000 +0200
+++ agrep-4.17/debian/changelog	2018-10-28 13:49:29.000000000 +0100
@@ -1,3 +1,12 @@
+agrep (4.17-9.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Drop override_dh_clean target, which does not clean
+    every generated file, but is also not needed. (Closes: #886872)
+  * Apply patch by Stefan Weil to fix crash by double free. (Closes: #869220)
+
+ -- Reiner Herrmann <[email protected]>  Sun, 28 Oct 2018 13:49:29 +0100
+
 agrep (4.17-9) unstable; urgency=low
 
   * debian/control
diff -Nru agrep-4.17/debian/patches/fix-double-free.patch agrep-4.17/debian/patches/fix-double-free.patch
--- agrep-4.17/debian/patches/fix-double-free.patch	1970-01-01 01:00:00.000000000 +0100
+++ agrep-4.17/debian/patches/fix-double-free.patch	2018-10-28 13:48:46.000000000 +0100
@@ -0,0 +1,28 @@
+Author: Stefan Weil <[email protected]>
+Description: Fix crash caused by double free
+Bug-Debian: https://bugs.debian.org/869220
+Forwarded: https://github.com/Wikinaut/agrep/pull/13
+
+--- a/asearch.c
++++ b/asearch.c
+@@ -254,7 +254,6 @@
+ 					{ 
+ 						if(FILENAMEONLY && (NEW_FILE || !POST_FILTER)) {
+ 							num_of_matched++;
+-							free_buf(text, buffer);
+ 
+ 							if (agrep_finalfp != NULL)
+ 								fprintf(agrep_finalfp, "%s", CurrentFileName);
+--- a/sgrep.c
++++ b/sgrep.c
+@@ -1079,7 +1079,9 @@
+ 	CHARTYPE *lastout = text;
+ 	int newlen;
+ 
+-	Candidate[0][0] = Candidate[0][1] = 0; 
++	Candidate[0][0] = 0;
++	Candidate[0][1] = 0;
++	Candidate[1][0] = 0;
+ 	d1 = shift_1;
+ 	cdx = 0;
+ 	if(m < 3) r1 = m;
diff -Nru agrep-4.17/debian/patches/series agrep-4.17/debian/patches/series
--- agrep-4.17/debian/patches/series	2012-02-23 15:18:47.000000000 +0100
+++ agrep-4.17/debian/patches/series	2018-10-28 13:42:24.000000000 +0100
@@ -2,3 +2,4 @@
 10-manpage-th.patch
 12-manpage-hyphen.patch
 15-manpage-url.patch
+fix-double-free.patch
diff -Nru agrep-4.17/debian/rules agrep-4.17/debian/rules
--- agrep-4.17/debian/rules	2012-04-10 23:11:21.000000000 +0200
+++ agrep-4.17/debian/rules	2018-10-27 19:34:43.000000000 +0200
@@ -4,15 +4,6 @@
 export DEB_CFLAGS_MAINT_APPEND	= -Wall -pedantic -I.
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-override_dh_clean:
-	#   The original sources contain *.orig and *.rej files
-	#   that must not be cleaned.
-	#   So do *not* run 'dh_clean' commands.
-
-	rm -rf debian/agrep debian/.#* debian/*[~#]
-	rm -f debian/files debian/*.log debian/*.substvars
-	[ ! -f Makefile ] || $(MAKE) clean
-
 override_dh_auto_build:
 	# These are the only variables that are free for user
 	$(MAKE) DEBUGFLAGS="$(CFLAGS) $(CPPFLAGS)" OTHERLIBS="$(LDFLAGS)"

Reply via email to