summaryrefslogtreecommitdiff
path: root/misc/less
diff options
context:
space:
mode:
authortaca <taca>2006-09-27 11:27:31 +0000
committertaca <taca>2006-09-27 11:27:31 +0000
commit66239a7bc95b7cb9984a91cd754943d8bf02805c (patch)
tree8ac5c9c3b2cbf2ad7a4a7b73017ccb76440b656b /misc/less
parent44f429d36916553659fbdd64a64500ed2099b434 (diff)
downloadpkgsrc-66239a7bc95b7cb9984a91cd754943d8bf02805c.tar.gz
Apply changes from NetBSD current approved by wiz@:
---------------------------------------------------------------------- Module Name: src Committed By: elad Date: Sat Sep 23 12:51:18 UTC 2006 Modified Files: src/usr.bin/less/less: command.c tags.c Log Message: PR 21741: Christian Biere: Buffer overrun and wrong usage of islower() in less 381 Over three years ago the less maintainer said he'll add these fixes. Nothing happened, so we do it ourselves. Thanks for the report and the patch! ---------------------------------------------------------------------- Bump PKGREVISION.
Diffstat (limited to 'misc/less')
-rw-r--r--misc/less/Makefile3
-rw-r--r--misc/less/distinfo4
-rw-r--r--misc/less/patches/patch-aa13
-rw-r--r--misc/less/patches/patch-ab46
4 files changed, 64 insertions, 2 deletions
diff --git a/misc/less/Makefile b/misc/less/Makefile
index e03a7371ef5..4a0b34e1f4f 100644
--- a/misc/less/Makefile
+++ b/misc/less/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2005/12/05 23:55:12 rillig Exp $
+# $NetBSD: Makefile,v 1.15 2006/09/27 11:28:32 taca Exp $
#
DISTNAME= less-382
+PKGREVISION= 1
CATEGORIES= misc
MASTER_SITES= http://www.greenwoodsoftware.com/less/ \
${MASTER_SITE_GNU:=less/}
diff --git a/misc/less/distinfo b/misc/less/distinfo
index 19f16fa6666..8f861ab5232 100644
--- a/misc/less/distinfo
+++ b/misc/less/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.8 2005/02/24 11:02:55 agc Exp $
+$NetBSD: distinfo,v 1.9 2006/09/27 11:28:32 taca Exp $
SHA1 (less-382.tar.gz) = 3c3f1ae0bf18039b047524ff0f573ef514bcc944
RMD160 (less-382.tar.gz) = 2b851c7038d9a4dea4f369ff5705eafc9093de97
Size (less-382.tar.gz) = 264414 bytes
+SHA1 (patch-aa) = 582fc623590ef23d4e8836d8a65a8df03c57f799
+SHA1 (patch-ab) = 40f45e9501b79525d5fb801d65e004e533fb8c06
diff --git a/misc/less/patches/patch-aa b/misc/less/patches/patch-aa
new file mode 100644
index 00000000000..87d27291fba
--- /dev/null
+++ b/misc/less/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1 2006/09/27 11:28:32 taca Exp $
+
+--- command.c.orig 2004-02-04 13:52:26.000000000 +0900
++++ command.c
+@@ -203,7 +203,7 @@ exec_mca()
+ every_first_cmd = save(cbuf);
+ break;
+ case A_OPT_TOGGLE:
+- toggle_option(optchar, cbuf, optflag);
++ toggle_option((unsigned char)optchar, cbuf, optflag);
+ optchar = '\0';
+ break;
+ case A_F_BRACKET:
diff --git a/misc/less/patches/patch-ab b/misc/less/patches/patch-ab
new file mode 100644
index 00000000000..e4c1d7eefae
--- /dev/null
+++ b/misc/less/patches/patch-ab
@@ -0,0 +1,46 @@
+$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;