From a7ed7cd4e92b9f9e4a88244086d21cc18e37e088 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sun, 23 Aug 2020 00:27:53 +0300 Subject: nvi: add new package at 1.81.6 --- editors/nvi/patches/nvi-29-file_backup.patch | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 editors/nvi/patches/nvi-29-file_backup.patch (limited to 'editors/nvi/patches/nvi-29-file_backup.patch') diff --git a/editors/nvi/patches/nvi-29-file_backup.patch b/editors/nvi/patches/nvi-29-file_backup.patch new file mode 100644 index 0000000..e168105 --- /dev/null +++ b/editors/nvi/patches/nvi-29-file_backup.patch @@ -0,0 +1,35 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 29file_backup.dpatch by +## +## DP: Save the intermediate CHAR2INT conversion pointer because +## DP: that pointer is reused by later conversions in calls below. + +@DPATCH@ +--- 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. -- cgit v1.2.3