git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cvsimport fails with cvsps core dump

From
RSRajkumar S <rajkumars+git@gmail.com>
Date
Sep 14, 2006, 07:22 UTC
Message-ID
<64de5c8b0609140022q1b645416kfcc4012145fb5085@mail.gmail.com>
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
Previous: Rajkumar S
Message 2 of 2 in “cvsimport fails with cvsps core dump”
  1. Rajkumar SSep 12, 2006
  2. Rajkumar SSep 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.