From: "Rajkumar S" <rajkumars+git@gmail.com>
To: git@vger.kernel.org
Subject: Re: cvsimport fails with cvsps core dump
Date: Thu, 14 Sep 2006 12:52:25 +0530 [thread overview]
Message-ID: <64de5c8b0609140022q1b645416kfcc4012145fb5085@mail.gmail.com> (raw)
In-Reply-To: <64de5c8b0609120914p4ea47860x60a294093d43bc24@mail.gmail.com>
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
prev parent reply other threads:[~2006-09-14 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 16:14 cvsimport fails with cvsps core dump Rajkumar S
2006-09-14 7:22 ` Rajkumar S [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64de5c8b0609140022q1b645416kfcc4012145fb5085@mail.gmail.com \
--to=rajkumars+git@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).