Package: nyquist
Version: 3.05-2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Dear Maintainer,

When building this package in Ubuntu Raring we are seeing reliable FTBFS
triggered by corrupted #include statements.  This is triggered by an
overlapping strcpy() which is not permitted.  Why this does not trigger
on other architectures is unclear.

In Ubuntu, the attached patch was applied to achieve the following:

  * patches/intgen-avoid-overlapping-strcpy.patch: avoid illegal
    overlapping strcpy invocation.

Thanks for considering the patch.

Andy.

-- System Information:
Debian Release: wheezy/sid
  APT prefers raring-updates
  APT policy: (500, 'raring-updates'), (500, 'raring-security'), (500, 'raring')
Architecture: i386 (i686)

Kernel: Linux 3.8.0-19-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru nyquist-3.05/debian/changelog nyquist-3.05/debian/changelog
diff -Nru nyquist-3.05/debian/patches/intgen-avoid-overlapping-strcpy.patch nyquist-3.05/debian/patches/intgen-avoid-overlapping-strcpy.patch
--- nyquist-3.05/debian/patches/intgen-avoid-overlapping-strcpy.patch	1970-01-01 01:00:00.000000000 +0100
+++ nyquist-3.05/debian/patches/intgen-avoid-overlapping-strcpy.patch	2013-04-22 17:02:52.000000000 +0100
@@ -0,0 +1,17 @@
+Description: intgen avoid overlapping strcpy
+ Lisp intgen is using overlapping strcpy which is not permitted,
+ switch to using memmove.
+Author: Andy Whitcroft <a...@ubuntu.com>
+Last-Update: 2013-04-22
+
+--- nyquist-3.05.orig/misc/intgen.c
++++ nyquist-3.05/misc/intgen.c
+@@ -487,7 +487,7 @@ static void process_file(fname, out)
+     /* strip off leading directory prefix, if any */
+     cp = strrchr(incl_file, FILESEP);	/* find the last slash */
+     if (cp) {
+-        strcpy(incl_file, cp + 1 /* skip the slash */);
++        memmove(incl_file, cp + 1 /* skip the slash */, strlen(cp + 1) + 1);
+     }
+ 
+     if (flag != no_include_prefix) fprintf(out, "#include \"%s\"\n\n", incl_file);
diff -Nru nyquist-3.05/debian/patches/series nyquist-3.05/debian/patches/series
--- nyquist-3.05/debian/patches/series	2012-07-18 02:02:31.000000000 +0100
+++ nyquist-3.05/debian/patches/series	2013-04-22 16:45:34.000000000 +0100
@@ -4,3 +4,4 @@
 use-system-liblo.patch
 use-system-portadio.patch
 fix-term-includes.patch
+intgen-avoid-overlapping-strcpy.patch

Reply via email to