threads / discuss / 5543

cvsimport fails with cvsps core dump

Subject: cvsimport fails with cvsps core dump

## tl;dr

2 messages between Sep 12, 2006 and Sep 14, 2006.

replies: 1people: 1as markdown or json

Rajkumar S· Sep 12, 2006, 16:14 UTC · lore
Hi,

While trying to cvsimport pfsense [1] source [2], cvsps coredumps and cvsimport aborts with the following error.

root@beastie:# git cvsimport -v -d /usr/local/pfSense/tmp/cvsroot -C pfSense/ pfSense Running cvsps... cvs_direct initialized to CVSROOT /usr/local/pfSense/tmp/cvsroot cvs rlog: Logging pfSense cvs rlog: Logging pfSense/bin cvs rlog: Logging pfSense/boot cvs rlog: Logging pfSense/boot/kernel cvs rlog: Logging pfSense/cf cvs rlog: Logging pfSense/cf/conf cvs rlog: Logging pfSense/conf.default cvs rlog: Logging pfSense/etc cvs rlog: Logging pfSense/etc/ascii-art cvs rlog: Logging pfSense/etc/inc DONE; creating master branch fatal: refs/heads/origin: not a valid SHA1 fatal: master: not a valid SHA1 fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions fatal: Not a valid object name HEAD checkout failed: 256

root@beastie:# ls pfSense/ .git cvsps.core

I am trying this in FreeBSD 6.1 with cvsps compiled from master branch of git repository at http://ydirson.free.fr/soft/git/cvsps.git

To replicate this error get the pfSense cvsroot tarball from [2] and run the command $ git cvsimport -v -d /<path>/cvsroot -C pfSense/ pfSense

While this is not a git bug as such, I have written to the cvsps author about this about one week back with no replies and this seems to be the only place interested in cvsps.

Thanks and regards,
raj

1 http://www.pfsense.com 2 http://www.pfsense.com/cvs.tgz

Rajkumar S· Sep 14, 2006, 07:22 UTC · re: Rajkumar S · lore

Re: cvsimport fails with cvsps core dump

On 9/12/06, Rajkumar S <rajkumars+git@gmail.com> wrote:
> While trying to cvsimport pfsense [1] source [2], cvsps coredumps and
> cvsimport aborts with the following error.

the function read_line does not check if the string is bigger that the space alloted, and core dumps when such a string is encountered.

I have a small patch which prevents the crashing, by stopping the copy when the buffer is full.

diff --git a/cvs_direct.c b/cvs_direct.c
index 920487d..3857ce2 100644
--- a/cvs_direct.c
+++ b/cvs_direct.c
@@ -679,8 +679,11 @@ static int read_line(CvsServerCtx * ctx,
        }
        p++;
        len++;
+       if (len >= BUFSIZ){
+           *p = 0;
+           break;
+       }
     }
-
     return len;
 }

raj

← back to recent threads