help-rcs
[Top][All Lists]
Advanced

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

Re: Wrong revision is retrieved


From: Thien-Thi Nguyen
Subject: Re: Wrong revision is retrieved
Date: Tue, 02 Apr 2013 19:07:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

() Bostjan Vilfan <address@hidden>
() Mon, 25 Mar 2013 06:19:13 +0100

   In the previous mail I forgot to add that I also tested
   rcs, version 5.8.1, on Ubuntu Linux, with the same ,v file, and
   obtained the same result. Therefore, it probably is a bug.

Yes, confirmed.  Thanks for reporting it.  Thanks also to Paul Eggert
for noting the nature (regression).  Here's a patch:
 src/rcsrev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/rcsrev.c b/src/rcsrev.c
index c9453e0..15d3605 100644
--- a/src/rcsrev.c
+++ b/src/rcsrev.c
@@ -595,7 +595,8 @@ rev_from_symbol (struct cbuf const *id)
     {
       struct symdef const *d = ls->entry;
 
-      if (!strncmp (d->meaningful, id->string, id->size))
+      if ('\0' == d->meaningful[id->size]
+          && !strncmp (d->meaningful, id->string, id->size))
         return d->underlying;
     }
   return NULL;
Does this fix work for you?

-- 
Thien-Thi Nguyen
GPG key: 4C807502

Attachment: pgptPfBJD72X6.pgp
Description: PGP signature


reply via email to

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