[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unitilialized CVSroot makes cvs-1.12.9.1 dump core
From: |
Martin Neitzel |
Subject: |
Unitilialized CVSroot makes cvs-1.12.9.1 dump core |
Date: |
Fri, 1 Oct 2004 19:11:42 +0200 (CEST) |
>Submitter-Id: net
>Originator: Martin Neitzel
>Organization: Gaertner Datensysteme
>Confidential: no
>Synopsis: Unitilialized CVSroot make cvs-1.12.9.1 dump core
>Severity: critical
>Priority: high
>Category: cvs
>Class: sw-bug
>Release: 1.12.9.1
>Environment:
Any HAVE_PUTENV platform with a bleeding edge main.c rev. 1.221
(2004/09/24) or higher.
>Description:
Cvs will dump core if when invoked when the repository is defined
through a CVS/Root file and no CVSROOT envvar or "-d repo" cmdline
is in place.
>How-To-Repeat:
Run any cvs command, say, "cvs stat" in a working directory.
>Fix:
The reason behind the core dump is essentially an uninitialized
"CVSroot" variable. It shows up when main.c tries to putenv
the final "CVSROOT" (strlen(NULL) in main.c, line 989 for -r 1.223)
The following patch re-introduces the initialization.
It may also resolve the "FIXME (njc)" comment in line 984
prior to the strlen/putenv in line .
Index: src/main.c
===================================================================
RCS file: /cvs/ccvs/src/main.c,v
retrieving revision 1.223
diff -u -r1.223 main.c
--- src/main.c 29 Sep 2004 20:47:14 -0000 1.223
+++ src/main.c 1 Oct 2004 14:06:49 -0000
@@ -877,6 +877,7 @@
if (CVSADM_Root && (!CVSroot || !cvs_update_env))
{
CVSroot_parsed = CVSADM_Root;
+ CVSroot = CVSADM_Root->original;
cvs_update_env = 1; /* need to update environment */
}
else if (!*CVSroot)
- Unitilialized CVSroot makes cvs-1.12.9.1 dump core,
Martin Neitzel <=