--- a/components/emacs/README Thu May 26 11:20:59 2011 -0700
+++ b/components/emacs/README Fri May 27 09:19:45 2011 -0600
@@ -56,6 +56,12 @@
Patch configure script to provide necessary missing
libraries for the GTK version of emacs.
+ etags.patch
+ The version of etags in Emacs 23.1 has a bug in the function
+ absolute_filename(). It uses strcpy() to do overlapped string
+ copies, which is undefined. This patch substitutes memmove(),
+ which exists specifically to handle that case.
+
- Emacs can be built as either 32-bit or 64-bit, depending on the target
machine. The benefit of a 64-bit emacs is that the size of the files it
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/emacs/patches/etags.patch Fri May 27 09:19:45 2011 -0600
@@ -0,0 +1,31 @@
+*** emacs-23.1/lib-src/etags.c.orig Wed May 25 16:16:55 2011
+--- emacs-23.1/lib-src/etags.c Wed May 25 16:18:29 2011
+***************
+*** 6695,6707 ****
+ else if (cp[0] != '/')
+ cp = slashp;
+ #endif
+! strcpy (cp, slashp + 3);
+ slashp = cp;
+ continue;
+ }
+ else if (slashp[2] == '/' || slashp[2] == '\0')
+ {
+! strcpy (slashp, slashp + 2);
+ continue;
+ }
+ }
+--- 6695,6707 ----
+ else if (cp[0] != '/')
+ cp = slashp;
+ #endif
+! memmove (cp, slashp + 3, strlen(slashp + 3) + 1);
+ slashp = cp;
+ continue;
+ }
+ else if (slashp[2] == '/' || slashp[2] == '\0')
+ {
+! memmove (slashp, slashp + 2, strlen(slashp + 2) + 1);
+ continue;
+ }
+ }