[cvsnt] BUG: Corrupted binary files

David Somers dsomers at trevezel.com
Tue Jun 21 11:26:02 BST 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


> > When you did an import over an existing file, as the rcs file was
> rewritten
> > the -k got corrupted.
> I did not do an import but a remove, I do not know if they go through the
> same code.

Yep, it went through the buggy code.

[snip]
> > fgrep is your friend.
> 10x, I'll look it up and see if I can get anything out of it.

Search for entries where kopt does not match a valid pattern, then fix.

> Presently I cannot risk using a development release, stable releases are
> enough of a headache :-P

Sure, but the problem occurs when a stable release has a bug... you either
have to work around the bug, upgrade to a development release, or merge any
fixes for that specific bug from the development back into your stable
release.

[snip]
> I need more information on the bug to be able to identify the
> corrupted RCS
> files.

RCS file: /var/lib/cvsnt/cvsnt/cvsnt/src/rcs.c,v
retrieving revision 1.80.2.168
retrieving revision 1.80.2.169
diff -u -r1.80.2.168 -r1.80.2.169
--- rcs.c	2005/05/31 20:40:02	1.80.2.168
+++ rcs.c	2005/06/01 10:09:28	1.80.2.169
@@ -5010,7 +5010,7 @@
 	np = getnode();
 	np->type = RCSFIELD;
 	np->key = xstrdup ("kopt");
-	np->data =
xstrdup((options&&*options)?options+2:(rcs->expand?rcs->expand:"kv"));
+	np->data =
xstrdup((options&&*options)?((options[0]=='-')?options+2:options):(rcs->expa
nd?rcs->expand:"kv"));
 	addnode (delta->other_delta, np);

 	/* Record the mergepoints */

Sometimes options was being passed without the -k prefix, and the code was
assuming that it had the prefix... so instead of writing out the correct
settings it would write out whatever garbage happened to be in memory after
the options.

> The bug database issue #26 does not give enough details.

If you want more/better handling, Tony Hoyle/March Hare do offer commercial
support.

Right, I'm either off to hack some code or enjoy some Pastis with lunch :-)

Greetings from Luxembourg,

David




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook