Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Corinna Vinschen Date: Thu, 7 Dec 2000 16:46:14 +0100 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="us-ascii" To: cygwin AT cygwin DOT com References: <5 DOT 0 DOT 0 DOT 25 DOT 0 DOT 20001206202732 DOT 02a2f640 AT pop DOT bresnanlink DOT net> <5 DOT 0 DOT 0 DOT 25 DOT 0 DOT 20001207090607 DOT 028cc290 AT pop DOT bresnanlink DOT net> In-Reply-To: <5.0.0.25.0.20001207090607.028cc290@pop.bresnanlink.net> Subject: Re: [patch] default homedir (was: Re: Problem withssh-keygen.exe. MIME-Version: 1.0 Message-Id: <00120716461402.03851@cobold> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id KAA31308 On Thursday 07 December 2000 16:15, Chris Abbey wrote: > >- You have used `passed_home_path' uninitialized which resulted in > > garbage in the output on my system when the `-p' option wasn't > > given. > > that was at line 393, the original strcpy, right? I thought > strcpy would effectively initialize it for us? I'm not quite sure what line you're referring to. The code was like that: char x[100]; ... if (strlen(x) == 0) strcpy(x, "foo"); So, if the option -p wasn't given, your code relied on the illegal assumption that the data space of an automatic var is filled with 0 bytes. The result was that `passed_home_path' was uninitialized when `-p' wasn't given and the strlen returned 0 only in 1 of 256 cases... > > >- We are following the GNU coding convention in that a space should be > > opps, another habit, again mental note made for future patches... > this particular file isn't exactly the model of consistent > formatting though, is it? Nope. The problem is that the file isn't consistantly maintained by people with the same style. This is a general problem in OS projects. Sometimes a patch is checked in without care for the style, sometimes it's forced by a maintainer, sometimes the maintainer uses it's own style ignoring the coding standard. A problem of confirmed habits... and I'm definitely not free of them. > no problem, I was part of the affected group, as were > people I know... don't ya just love open source. :) Yep. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. mailto:vinschen AT redhat DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com