summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@ubuntu.com>2013-04-22 17:13:04 +0100
committerMattia Rizzolo <mattia@debian.org>2017-04-02 20:04:56 +0200
commit98648855a068c645d5877b0081b667f91f596b1a (patch)
tree0a0363533ca7ee47efcbb55959f105b8f3c8e039
parentff55b46ee1981e128be7e68576dc8e5f84119606 (diff)
Add patch to fix FTBFS on i386 due to overlapping use of strcpy().
Closes: #705948 Signed-off-by: Mattia Rizzolo <mattia@debian.org>
-rw-r--r--debian/patches/intgen-avoid-overlapping-strcpy.patch17
-rw-r--r--debian/patches/series1
-rw-r--r--misc/intgen.c2
3 files changed, 19 insertions, 1 deletions
diff --git a/debian/patches/intgen-avoid-overlapping-strcpy.patch b/debian/patches/intgen-avoid-overlapping-strcpy.patch
new file mode 100644
index 0000000..1aa53fd
--- /dev/null
+++ b/debian/patches/intgen-avoid-overlapping-strcpy.patch
@@ -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 <apw@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 --git a/debian/patches/series b/debian/patches/series
index 924a4ee..4beb433 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ use-system-sndfile.patch
use-system-liblo.patch
use-system-portadio.patch
fix-term-includes.patch
+intgen-avoid-overlapping-strcpy.patch
diff --git a/misc/intgen.c b/misc/intgen.c
index d9228a7..c42127c 100644
--- a/misc/intgen.c
+++ b/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);