summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2005-08-16 16:34:19 +0000
committerxsa <xsa@openbsd.org>2005-08-16 16:34:19 +0000
commit5190dc2fa973b64e65a67d3957ce971aa546c25c (patch)
treebc3527f189ce58b486609e990f3bfa34fe7e6f5e /usr.bin
parentin case we're pretending to install, there's no borked package to create. (diff)
downloadwireguard-openbsd-5190dc2fa973b64e65a67d3957ce971aa546c25c.tar.xz
wireguard-openbsd-5190dc2fa973b64e65a67d3957ce971aa546c25c.zip
#define CVS_ENT_MAXLINELEN 1024
.. as the maximum length of a line in an Entries file, and use it. problem spotted a while ago by mpech@. ok jfb joris
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/cvs.h4
-rw-r--r--usr.bin/cvs/entries.c5
-rw-r--r--usr.bin/cvs/resp.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h
index 5507c93f181..0d16dbc8080 100644
--- a/usr.bin/cvs/cvs.h
+++ b/usr.bin/cvs/cvs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.h,v 1.79 2005/08/12 14:41:54 xsa Exp $ */
+/* $OpenBSD: cvs.h,v 1.80 2005/08/16 16:34:19 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -244,6 +244,8 @@ struct cvsroot {
#define CVS_ENT_REMOVED 2
#define CVS_ENT_UPTODATE 3
+#define CVS_ENT_MAXLINELEN 1024
+
#define CVS_ENTF_SYNC 0x01 /* contents of disk and memory match */
#define CVS_ENTF_WR 0x02 /* file is opened for writing too */
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c
index c014774aca6..b139b80b16d 100644
--- a/usr.bin/cvs/entries.c
+++ b/usr.bin/cvs/entries.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: entries.c,v 1.44 2005/08/12 18:46:53 xsa Exp $ */
+/* $OpenBSD: entries.c,v 1.45 2005/08/16 16:34:19 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -53,7 +53,8 @@ cvs_ent_open(const char *dir, int flags)
{
size_t len;
int exists, nodir;
- char cdpath[MAXPATHLEN], entpath[MAXPATHLEN], ebuf[128], mode[4];
+ char cdpath[MAXPATHLEN], ebuf[CVS_ENT_MAXLINELEN], entpath[MAXPATHLEN];
+ char mode[4];
FILE *fp;
struct stat st;
struct cvs_ent *ent;
diff --git a/usr.bin/cvs/resp.c b/usr.bin/cvs/resp.c
index 36f2c6ea67a..39fc6c4a217 100644
--- a/usr.bin/cvs/resp.c
+++ b/usr.bin/cvs/resp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resp.c,v 1.54 2005/08/14 23:24:55 joris Exp $ */
+/* $OpenBSD: resp.c,v 1.55 2005/08/16 16:34:19 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -508,7 +508,7 @@ cvs_resp_createdir(char *line)
static int
cvs_resp_newentry(struct cvsroot *root, int type, char *line)
{
- char entbuf[128];
+ char entbuf[CVS_ENT_MAXLINELEN];
struct cvs_ent *ent;
/* get the remote path */