diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2018-10-26 21:56:10 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2018-10-26 21:56:10 +0000 |
commit | e2d12c6aa2b21d19b04bfa3f53607485ebb103c3 (patch) | |
tree | 5f1acb95156c3f02b46d3ba64beb3c88d272fd0a /sysutils | |
parent | 47602d4858d0a7e13d306fbeaf3ee4f542923677 (diff) | |
download | ports-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/Makefile | 2 | ||||
-rw-r--r-- | sysutils/yank/files/patch-yank.c | 12 |
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': |