Index: contrib/cvs/src/login.c =================================================================== RCS file: /home/ncvs/src/contrib/cvs/src/login.c,v retrieving revision 1.3.2.4 diff -u -d -r1.3.2.4 login.c --- contrib/cvs/src/login.c 19 Dec 2002 21:17:56 -0000 1.3.2.4 +++ contrib/cvs/src/login.c 19 Apr 2005 20:24:58 -0000 @@ -125,7 +125,7 @@ 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: contrib/cvs/src/patch.c =================================================================== RCS file: /home/ncvs/src/contrib/cvs/src/patch.c,v retrieving revision 1.1.1.7.2.5 diff -u -d -r1.1.1.7.2.5 patch.c --- contrib/cvs/src/patch.c 21 Jan 2003 22:26:44 -0000 1.1.1.7.2.5 +++ contrib/cvs/src/patch.c 19 Apr 2005 20:27:52 -0000 @@ -375,6 +375,7 @@ 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 @@ 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 @@ free (vers_tag); if (vers_head != NULL) free (vers_head); - if (rcs != NULL) - free (rcs); + if (rcs_orig) + free (rcs_orig); return (ret); } Index: contrib/cvs/src/rcs.c =================================================================== RCS file: /home/ncvs/src/contrib/cvs/src/rcs.c,v retrieving revision 1.19.2.5 diff -u -d -r1.19.2.5 rcs.c --- contrib/cvs/src/rcs.c 21 Jan 2003 22:26:44 -0000 1.19.2.5 +++ contrib/cvs/src/rcs.c 19 Apr 2005 20:26:30 -0000 @@ -3034,8 +3034,7 @@ if (retval != NULL) return (retval); - if (!force_tag_match || - (vers != NULL && RCS_datecmp (vers->date, date) <= 0)) + if (vers && (!force_tag_match || RCS_datecmp (vers->date, date) <= 0)) return (xstrdup (vers->version)); else return (NULL); @@ -4118,7 +4117,7 @@ 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; @@ -7398,7 +7397,7 @@ 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. */ @@ -7409,10 +7408,12 @@ 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, '.');