aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nvi/29file_backup.patch
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-11-30 19:14:21 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2015-12-07 18:51:21 +0100
commit7525cfa63719a65d5c5f924219b13a0111f1343f (patch)
tree459dbac35248cc6b5b0c93e8764d42b5a5d541b6 /testing/nvi/29file_backup.patch
parent4b763f9b85d0696d458ffbd14d99544cdd7550cf (diff)
downloadaports-7525cfa63719a65d5c5f924219b13a0111f1343f.tar.bz2
aports-7525cfa63719a65d5c5f924219b13a0111f1343f.tar.xz
testing/nvi: new aport
Including a subset of the debian patchset.
Diffstat (limited to 'testing/nvi/29file_backup.patch')
-rw-r--r--testing/nvi/29file_backup.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/nvi/29file_backup.patch b/testing/nvi/29file_backup.patch
new file mode 100644
index 0000000000..52b1e9298b
--- /dev/null
+++ b/testing/nvi/29file_backup.patch
@@ -0,0 +1,32 @@
+From: <hesso@pool.math.tu-berlin.de>
+Subject: Save the intermediate CHAR2INT conversion pointer because
+ that pointer is reused by later conversions in calls below.
+
+--- nvi-1.81.6.orig/common/exf.c 2009-07-24 11:30:05.962060755 +0200
++++ nvi-1.81.6/common/exf.c 2009-07-24 12:09:57.511311177 +0200
+@@ -1092,8 +1092,8 @@
+ size_t blen;
+ int flags, maxnum, nr, num, nw, rfd, wfd, version;
+ char *bp, *estr, *p, *pct, *slash, *t, *wfname, buf[8192];
+- CHAR_T *wp;
+- size_t wlen;
++ CHAR_T *wp, *wp2;
++ size_t wlen, wlen2;
+ size_t nlen;
+ char *d = NULL;
+
+@@ -1148,8 +1148,13 @@
+ } else
+ version = 0;
+ CHAR2INT(sp, bname, strlen(bname) + 1, wp, wlen);
+- if (argv_exp2(sp, &cmd, wp, wlen - 1))
++ GET_SPACE_RETW(sp, wp2, wlen2, wlen);
++ MEMCPY(wp2, wp, wlen);
++ if (argv_exp2(sp, &cmd, wp2, wlen2 - 1)) {
++ FREE_SPACEW(sp, wp2, wlen2);
+ return (1);
++ }
++ FREE_SPACEW(sp, wp2, wlen2);
+
+ /*
+ * 0 args: impossible.