summaryrefslogtreecommitdiff
path: root/editors/nano/patches
diff options
context:
space:
mode:
authorbsiegert <bsiegert>2016-03-26 20:21:37 +0000
committerbsiegert <bsiegert>2016-03-26 20:21:37 +0000
commit4a70b1039403faa73fcd31ce52e1332b1d8c4004 (patch)
tree242af2209c9c2342a9049b3f1733e3c571547d94 /editors/nano/patches
parent002a27bfd66c54fb25d2cd66fd4e43377dc42e92 (diff)
downloadpkgsrc-4a70b1039403faa73fcd31ce52e1332b1d8c4004.tar.gz
Fix opening files in directories other than the current one (no, really).
From coypu in PR pkg/51010. Bump PKGREVISION.
Diffstat (limited to 'editors/nano/patches')
-rw-r--r--editors/nano/patches/patch-src_files.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/editors/nano/patches/patch-src_files.c b/editors/nano/patches/patch-src_files.c
new file mode 100644
index 00000000000..79587bd0838
--- /dev/null
+++ b/editors/nano/patches/patch-src_files.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_files.c,v 1.1 2016/03/26 20:21:37 bsiegert Exp $
+
+--- src/files.c.orig 2016-02-25 20:47:10.000000000 +0000
++++ src/files.c
+@@ -43,7 +43,7 @@ bool has_valid_path(const char *filename
+ if (strrchr(filename, '/') == NULL)
+ parentdir = mallocstrcpy(NULL, ".");
+ else
+- parentdir = dirname(mallocstrcpy(NULL, filename));
++ parentdir = mallocstrcpy(NULL, dirname(filename));
+
+ if (stat(parentdir, &parentinfo) == -1) {
+ if (errno == ENOENT)