Apply by doing: cd /usr/src patch -p0 < 001_cvs.patch And then rebuild and install cvs: cd gnu/usr.bin/cvs make -f Makefile.bsd-wrapper obj make -f Makefile.bsd-wrapper make -f Makefile.bsd-wrapper install Index: gnu/usr.bin/cvs/src/login.c =================================================================== RCS file: /cvs/src/gnu/usr.bin/cvs/src/login.c,v retrieving revision 1.2 retrieving revision 1.2.12.1 diff -u -p -r1.2 -r1.2.12.1 --- gnu/usr.bin/cvs/src/login.c 20 Apr 2002 04:22:11 -0000 1.2 +++ gnu/usr.bin/cvs/src/login.c 23 May 2005 06:37:21 -0000 1.2.12.1 @@ -133,7 +133,7 @@ password_entry_parseline (cvsroot_canoni if (isspace(*(linebuf + 1))) /* special case since strtoul ignores leading white space */ - entry_version = 0; + q = linebuf + 1; else entry_version = strtoul (linebuf + 1, &q, 10); Index: gnu/usr.bin/cvs/src/patch.c =================================================================== RCS file: /cvs/src/gnu/usr.bin/cvs/src/patch.c,v retrieving revision 1.14 retrieving revision 1.14.16.1 diff -u -p -r1.14 -r1.14.16.1 --- gnu/usr.bin/cvs/src/patch.c 28 Sep 2001 23:26:33 -0000 1.14 +++ gnu/usr.bin/cvs/src/patch.c 23 May 2005 06:37:21 -0000 1.14.16.1 @@ -375,6 +375,7 @@ patch_fileproc (callerdat, finfo) struct utimbuf t; char *vers_tag, *vers_head; char *rcs = NULL; + char *rcs_orig = NULL; RCSNode *rcsfile; FILE *fp1, *fp2, *fp3; int ret = 0; @@ -404,7 +405,7 @@ patch_fileproc (callerdat, finfo) if ((rcsfile->flags & VALID) && (rcsfile->flags & INATTIC)) isattic = 1; - rcs = xmalloc (strlen (finfo->file) + sizeof (RCSEXT) + 5); + rcs_orig = rcs = xmalloc (strlen (finfo->file) + sizeof (RCSEXT) + 5); (void) sprintf (rcs, "%s%s", finfo->file, RCSEXT); /* if vers_head is NULL, may have been removed from the release */ @@ -743,8 +744,8 @@ failed to read diff file header %s for % free (vers_tag); if (vers_head != NULL) free (vers_head); - if (rcs != NULL) - free (rcs); + if (rcs_orig) + free (rcs_orig); return (ret); } Index: gnu/usr.bin/cvs/src/rcs.c =================================================================== RCS file: /cvs/src/gnu/usr.bin/cvs/src/rcs.c,v retrieving revision 1.18 retrieving revision 1.18.6.1 diff -u -p -r1.18 -r1.18.6.1 --- gnu/usr.bin/cvs/src/rcs.c 16 Dec 2003 22:15:10 -0000 1.18 +++ gnu/usr.bin/cvs/src/rcs.c 23 May 2005 06:37:21 -0000 1.18.6.1 @@ -2895,7 +2895,7 @@ RCS_getdate (rcs, date, force_tag_match) if (retval != NULL) return (retval); - if (!force_tag_match || RCS_datecmp (vers->date, date) <= 0) + if (vers && (!force_tag_match || RCS_datecmp (vers->date, date) <= 0)) return (xstrdup (vers->version)); else return (NULL); @@ -3968,7 +3968,7 @@ RCS_checkout (rcs, workfile, rev, nameta size_t len; int free_value = 0; char *log = NULL; - size_t loglen; + size_t loglen = 0; Node *vp = NULL; #ifdef PRESERVE_PERMISSIONS_SUPPORT uid_t rcs_owner = (uid_t) -1; @@ -7236,7 +7236,7 @@ RCS_deltas (rcs, fp, rcsbuf, version, op for (ln = 0; ln < headlines.nlines; ++ln) { - char buf[80]; + char *buf; /* Period which separates year from month in date. */ char *ym; /* Period which separates month from day in date. */ @@ -7247,10 +7247,12 @@ RCS_deltas (rcs, fp, rcsbuf, version, op if (prvers == NULL) prvers = vers; + buf = xmalloc (strlen (prvers->version) + 24); sprintf (buf, "%-12s (%-8.8s ", prvers->version, prvers->author); cvs_output (buf, 0); + free (buf); /* Now output the date. */ ym = strchr (prvers->date, '.');