exuberant-ctags #594185 -> squeeze?
Hi,
A friend reminded me about #594185, which I'd overlooked. I can't get
it to break on i386, but apparently it renders the package "completely
broken" on amd64. I've uploaded a fix to unstable, and I'd like to
upload this patch to stable - would that be OK?
diff -Nru exuberant-ctags-5.8/debian/changelog exuberant-ctags-5.8/debian/changelog
--- exuberant-ctags-5.8/debian/changelog 2010-07-12 10:12:15.000000000 +0100
+++ exuberant-ctags-5.8/debian/changelog 2011-02-17 14:09:38.000000000 +0000
@@ -1,3 +1,10 @@
+exuberant-ctags (1:5.8-3squeeze1) stable; urgency=low
+
+ * Apply patch from Ben Spencer to use memmove rather than strcpy on
+ overlapping strings (closes: #594185).
+
+ -- Colin Watson <cjwatson@debian.org> Thu, 17 Feb 2011 14:09:34 +0000
+
exuberant-ctags (1:5.8-3) unstable; urgency=low
* Compile with -D_FILE_OFFSET_BITS=64 in order to support 64-bit inode
diff -Nru exuberant-ctags-5.8/debian/patches/memmove.patch exuberant-ctags-5.8/debian/patches/memmove.patch
--- exuberant-ctags-5.8/debian/patches/memmove.patch 1970-01-01 01:00:00.000000000 +0100
+++ exuberant-ctags-5.8/debian/patches/memmove.patch 2011-02-17 14:08:58.000000000 +0000
@@ -0,0 +1,28 @@
+Description: Use memmove on overlapping strings
+ strcpy is not guaranteed to work on overlapping strings, and this can lead
+ to broken paths appearing in tag files. Use memmove instead.
+Author: Ben Spencer
+Origin: other, http://sourceforge.net/tracker/?func=detail&aid=3034816&group_id=6556&atid=306556
+Forwarded: yes
+Last-Update: 2011-02-17
+
+Index: b/routines.c
+===================================================================
+--- a/routines.c
++++ b/routines.c
+@@ -757,13 +757,13 @@
+ else if (cp [0] != PATH_SEPARATOR)
+ cp = slashp;
+ #endif
+- strcpy (cp, slashp + 3);
++ memmove (cp, slashp + 3, strlen(slashp + 3) + 1);
+ slashp = cp;
+ continue;
+ }
+ else if (slashp [2] == PATH_SEPARATOR || slashp [2] == '\0')
+ {
+- strcpy (slashp, slashp + 2);
++ memmove (slashp, slashp + 2, strlen(slashp + 2) + 1);
+ continue;
+ }
+ }
diff -Nru exuberant-ctags-5.8/debian/patches/series exuberant-ctags-5.8/debian/patches/series
--- exuberant-ctags-5.8/debian/patches/series 2010-02-26 23:09:37.000000000 +0000
+++ exuberant-ctags-5.8/debian/patches/series 2011-02-17 14:08:58.000000000 +0000
@@ -1,2 +1,3 @@
make-match-loop.patch
php-ignore-keywords-in-comments.patch
+memmove.patch
Thanks,
--
Colin Watson [cjwatson@debian.org]
Reply to: