[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Another bug in "admin -m"

From: Rodolfo Schulz de Lima
Subject: RE: Another bug in "admin -m"
Date: Sat, 18 Oct 2003 16:23:14 -0300

> To me it appears that this problem will arise only if SOME_TAG does not
> exist in all of the files provided as an argument to the cvs admin
> command. Still it should work on any file that does have SOME_TAG in it
> and not fail on those that do not.

Of course I've been peeking around cvs code for 2 days, but by looking at
the following code

            case 'm':
                p = strchr (arg, ':');
                if (p == NULL)
                    error (0, 0, "%s: -m option lacks revision number",
                    status = 1;
                *p = '\0';
                rev = RCS_gettag (rcs, arg + 2, 1, NULL); /* Force tag match
                if (rev == NULL)
                    error (0, 0, "%s: no such revision %s", rcs->path,
                    status = 1;
                    *p++ = ':';
                *p++ = ':';
                msg = p;

when you set *p='\0', you're changing the command argument applied to all
files. If you don't set *p to ':' again when a revision is not found, the
wrong command line will be used to all remaining files, and the check for a
revision number will fail. So, the command will work (because of *p++ = ':')
until one revision is not found, then all the following files will fail,
whether the revision exists or not. Of course, this problem didn't happen in
1.11.9 because RCS_gettag always returned something different than NULL :)
Removed one bug that unhide (unhode???) another one :)

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 1/9/2003

reply via email to

[Prev in Thread] Current Thread [Next in Thread]