diff options
author | tnn <tnn@pkgsrc.org> | 2007-04-25 18:10:17 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2007-04-25 18:10:17 +0000 |
commit | 60b9dd9dca18609f32408a0a92c9d275b7b0b085 (patch) | |
tree | 9d7caec8e8da9f2b9b660d623cf4410abd2cb21a /misc/less | |
parent | c6124d7415ef89ff7193751766d67181016f6bf7 (diff) | |
download | pkgsrc-60b9dd9dca18609f32408a0a92c9d275b7b0b085.tar.gz |
Forgot patches related to less-394:
o patch-ab was merged+removed.
o patch-ac was added, bring in coverity fix from netbsd-current.
Diffstat (limited to 'misc/less')
-rw-r--r-- | misc/less/patches/patch-ab | 46 | ||||
-rw-r--r-- | misc/less/patches/patch-ac | 14 |
2 files changed, 14 insertions, 46 deletions
diff --git a/misc/less/patches/patch-ab b/misc/less/patches/patch-ab deleted file mode 100644 index e4c1d7eefae..00000000000 --- a/misc/less/patches/patch-ab +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2006/09/27 11:28:32 taca Exp $ - ---- tags.c.orig 2004-02-04 13:52:27.000000000 +0900 -+++ tags.c -@@ -498,7 +498,7 @@ findgtag(tag, type) - #if !HAVE_POPEN - return TAG_NOFILE; - #else -- char command[512]; -+ char *command; - char *flag; - char *qtag; - char *cmd = lgetenv("LESSGLOBALTAGS"); -@@ -528,10 +528,13 @@ findgtag(tag, type) - qtag = shell_quote(tag); - if (qtag == NULL) - qtag = tag; -+ command = (char *)ecalloc(strlen(cmd) + strlen(flag) + -+ strlen(qtag) + 5, sizeof(char)); - sprintf(command, "%s -x%s %s", cmd, flag, qtag); - if (qtag != tag) - free(qtag); - fp = popen(command, "r"); -+ free(command); - #endif - } - if (fp != NULL) -@@ -539,6 +542,7 @@ findgtag(tag, type) - while (fgets(buf, sizeof(buf), fp)) - { - char *name, *file, *line; -+ size_t len; - - if (sigs) - { -@@ -548,8 +552,8 @@ findgtag(tag, type) - #endif - return TAG_INTR; - } -- if (buf[strlen(buf) - 1] == '\n') -- buf[strlen(buf) - 1] = 0; -+ if ((len = strlen(buf)) && buf[len - 1] == '\n') -+ buf[len - 1] = 0; - else - { - int c; diff --git a/misc/less/patches/patch-ac b/misc/less/patches/patch-ac new file mode 100644 index 00000000000..1dc81726dd5 --- /dev/null +++ b/misc/less/patches/patch-ac @@ -0,0 +1,14 @@ +$NetBSD: patch-ac,v 1.1 2007/04/25 18:10:17 tnn Exp $ + +--- edit.c.orig 2005-12-03 21:20:32.000000000 +0100 ++++ edit.c +@@ -711,7 +711,8 @@ use_logfile(filename) + */ + filename = shell_unquote(filename); + exists = open(filename, OPEN_READ); +- close(exists); ++ if (exists >= 0) ++ close(exists); + exists = (exists >= 0); + + /* |