tags 655470 + patch pending
thanks

Dear maintainer,

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

Regards.
diff -Nru hexer-0.1.7/debian/changelog hexer-0.1.7/debian/changelog
--- hexer-0.1.7/debian/changelog	2011-07-13 21:55:49.000000000 +0200
+++ hexer-0.1.7/debian/changelog	2012-08-05 20:30:32.000000000 +0200
@@ -1,3 +1,14 @@
+hexer (0.1.7-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Thibaut Girka ]
+  * debian/patches/negative_size.patch:
+    - Fix crash when attempting to delete an half-byte while in insert
+      or replace mode (Closes: #655470).
+
+ -- Luca Falavigna <dktrkr...@debian.org>  Sun, 05 Aug 2012 20:28:16 +0200
+
 hexer (0.1.7-1) unstable; urgency=low
 
   * New upstream release:
diff -Nru hexer-0.1.7/debian/patches/negative_size.patch hexer-0.1.7/debian/patches/negative_size.patch
--- hexer-0.1.7/debian/patches/negative_size.patch	1970-01-01 01:00:00.000000000 +0100
+++ hexer-0.1.7/debian/patches/negative_size.patch	2012-08-05 20:28:11.000000000 +0200
@@ -0,0 +1,31 @@
+Description: fix crash when attempting to delete an half-byte while
+ in insert or replace mode
+Author: Thibaut Girka <t...@sitedethib.com>
+
+Index: hexer-0.1.7/edit.c
+===================================================================
+--- hexer-0.1.7.orig/edit.c	2010-12-29 11:22:44.000000000 +0100
++++ hexer-0.1.7/edit.c	2012-08-05 20:27:03.142271511 +0200
+@@ -1524,8 +1524,10 @@
+             hedit->insert_position = -1;
+             b_copy(hedit->buffer, replace,
+                    hedit->position, replace->size - 1, 1);
+-            b_set_size(replace, replace->size - 1);
+-            b_set_size(insert, insert->size - 1);
++            if (replace->size > 0)
++                b_set_size(replace, replace->size - 1);
++            if (insert->size > 0)
++                b_set_size(insert, insert->size - 1);
+             he_refresh_part(hedit, hedit->position, hedit->position);
+           } else
+             if (insert->size) {
+@@ -1553,7 +1555,8 @@
+             insert_state = 0;
+             hedit->insert_position = -1;
+             b_delete(hedit->buffer, hedit->position, 1);
+-            b_set_size(insert, insert->size - 1);
++            if (insert->size > 0)
++              b_set_size(insert, insert->size - 1);
+             he_refresh_part(hedit, hedit->position, hedit->buffer->size - 1);
+           } else
+             if (insert->size) {
diff -Nru hexer-0.1.7/debian/patches/series hexer-0.1.7/debian/patches/series
--- hexer-0.1.7/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ hexer-0.1.7/debian/patches/series	2012-08-05 20:26:38.000000000 +0200
@@ -0,0 +1 @@
+negative_size.patch

Reply via email to