{"thread":{"id":"5543","subject":"cvsimport fails with cvsps core dump","startedAt":"2006-09-12T16:14:28Z","lastAt":"2006-09-14T07:22:25Z","messageCount":2,"participants":["Rajkumar S"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26773","messageId":"64de5c8b0609120914p4ea47860x60a294093d43bc24@mail.gmail.com","threadId":"5543","inReplyTo":null,"subject":"cvsimport fails with cvsps core dump","fromName":"Rajkumar S","fromEmail":"rajkumars+git@gmail.com","sentAt":"2006-09-12T16:14:28Z","receivedAt":"2006-09-12T16:14:28Z","isPatch":false,"sender":{"key":"rajkumars+git@gmail.com","avatar":null},"body":"Hi,\n\nWhile trying to cvsimport pfsense [1] source [2], cvsps coredumps and\ncvsimport aborts with the following error.\n\nroot@beastie:# git cvsimport -v -d /usr/local/pfSense/tmp/cvsroot -C\npfSense/ pfSense\nRunning cvsps...\ncvs_direct initialized to CVSROOT /usr/local/pfSense/tmp/cvsroot\ncvs rlog: Logging pfSense\ncvs rlog: Logging pfSense/bin\ncvs rlog: Logging pfSense/boot\ncvs rlog: Logging pfSense/boot/kernel\ncvs rlog: Logging pfSense/cf\ncvs rlog: Logging pfSense/cf/conf\ncvs rlog: Logging pfSense/conf.default\ncvs rlog: Logging pfSense/etc\ncvs rlog: Logging pfSense/etc/ascii-art\ncvs rlog: Logging pfSense/etc/inc\nDONE; creating master branch\nfatal: refs/heads/origin: not a valid SHA1\nfatal: master: not a valid SHA1\nfatal: ambiguous argument 'HEAD': unknown revision or path not in the\nworking tree.\nUse '--' to separate paths from revisions\nfatal: Not a valid object name HEAD\ncheckout failed: 256\n\nroot@beastie:# ls pfSense/\n.git            cvsps.core\n\nI am trying this in FreeBSD 6.1 with cvsps compiled from master branch\nof git repository at http://ydirson.free.fr/soft/git/cvsps.git\n\nTo replicate this error get the pfSense cvsroot tarball from [2] and\nrun the command\n$ git cvsimport -v -d /<path>/cvsroot -C pfSense/ pfSense\n\nWhile this is not a git bug as such, I have written to the cvsps\nauthor about this about one week back with no replies and this seems\nto be the only place interested in cvsps.\n\nThanks and regards,\n\nraj\n\n1 http://www.pfsense.com\n2 http://www.pfsense.com/cvs.tgz\n"},{"id":"26874","messageId":"64de5c8b0609140022q1b645416kfcc4012145fb5085@mail.gmail.com","threadId":"5543","inReplyTo":"64de5c8b0609120914p4ea47860x60a294093d43bc24@mail.gmail.com","subject":"Re: cvsimport fails with cvsps core dump","fromName":"Rajkumar S","fromEmail":"rajkumars+git@gmail.com","sentAt":"2006-09-14T07:22:25Z","receivedAt":"2006-09-14T07:22:25Z","isPatch":false,"sender":{"key":"rajkumars+git@gmail.com","avatar":null},"body":"On 9/12/06, Rajkumar S <rajkumars+git@gmail.com> wrote:\n> While trying to cvsimport pfsense [1] source [2], cvsps coredumps and\n> cvsimport aborts with the following error.\n\nthe function read_line does not check if the string is bigger that the\nspace alloted, and core dumps when such a string is encountered.\n\nI have a small patch which prevents the crashing, by stopping the copy\nwhen the buffer is full.\n\ndiff --git a/cvs_direct.c b/cvs_direct.c\nindex 920487d..3857ce2 100644\n--- a/cvs_direct.c\n+++ b/cvs_direct.c\n@@ -679,8 +679,11 @@ static int read_line(CvsServerCtx * ctx,\n        }\n        p++;\n        len++;\n+       if (len >= BUFSIZ){\n+           *p = 0;\n+           break;\n+       }\n     }\n-\n     return len;\n }\n\nraj\n"}]}