aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-10-26 21:56:10 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-10-26 21:56:10 +0000
commite2d12c6aa2b21d19b04bfa3f53607485ebb103c3 (patch)
tree5f1acb95156c3f02b46d3ba64beb3c88d272fd0a /sysutils
parent47602d4858d0a7e13d306fbeaf3ee4f542923677 (diff)
downloadports-e2d12c6aa2b21d19b04bfa3f53607485ebb103c3.tar.gz
ports-e2d12c6aa2b21d19b04bfa3f53607485ebb103c3.zip
sysutils/yank: fix crash when using -g with -l
Notes
Notes: svn path=/head/; revision=483060
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/yank/Makefile2
-rw-r--r--sysutils/yank/files/patch-yank.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/sysutils/yank/Makefile b/sysutils/yank/Makefile
index 40ab56d6a1c1..c237e99eb0dc 100644
--- a/sysutils/yank/Makefile
+++ b/sysutils/yank/Makefile
@@ -2,7 +2,7 @@
PORTNAME= yank
DISTVERSION= 1.0.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= https://github.com/mptre/yank/releases/download/v${DISTVERSION}/
diff --git a/sysutils/yank/files/patch-yank.c b/sysutils/yank/files/patch-yank.c
new file mode 100644
index 000000000000..048812176528
--- /dev/null
+++ b/sysutils/yank/files/patch-yank.c
@@ -0,0 +1,12 @@
+--- yank.c.orig 2018-09-09 07:45:36 UTC
++++ yank.c
+@@ -430,7 +430,8 @@ main(int argc, char *argv[])
+ break;
+ case 'g':
+ free(pat);
+- pat = optarg;
++ if ((pat = strdup(optarg)) == NULL)
++ err(1, NULL);
+ rflags |= REG_NEWLINE;
+ break;
+ case 'i':