From owner-cvs-all Sun Dec 3 19:12:35 2000 From owner-cvs-all@FreeBSD.ORG Sun Dec 3 19:12:33 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from athserv.otenet.gr (athserv.otenet.gr [195.170.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4A63837B400 for ; Sun, 3 Dec 2000 19:12:32 -0800 (PST) Received: from hades.hell.gr (patr530-b005.otenet.gr [195.167.121.133]) by athserv.otenet.gr (8.10.1/8.10.1) with ESMTP id eB438b518795 for ; Mon, 4 Dec 2000 05:08:39 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.1/8.11.1) id eB439xG16581 for cvs-all@FreeBSD.ORG; Mon, 4 Dec 2000 05:09:59 +0200 (EET) Date: Mon, 4 Dec 2000 05:09:58 +0200 From: Giorgos Keramidas To: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/gen setproctitle.c Message-ID: <20001204050958.A16559@hades.hell.gr> References: <200012040145.eB41jw809701@freefall.freebsd.org> <200012040235.eB42Z3A16145@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200012040235.eB42Z3A16145@hades.hell.gr>; from keramida@ceid.upatras.gr on Mon, Dec 04, 2000 at 04:35:03AM +0200 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Dec 04, 2000 at 04:35:03AM +0200, Giorgos Keramidas wrote: > John Polstra wrote: > > > > Modified files: > > lib/libc/gen setproctitle.c > > Log: > > When recording the original arguments, stop short if we encounter > > a NULL argument. Some programs change the contents of the argv > > array, typically to remove some special arguments. They shorten > > argv by storing a NULL where an argument pointer used to be. Such > > programs core dumped if they called setproctitle(), because it > > would try to apply strlen() to a NULL pointer. > > What about avoiding parts of oargv[] in setproctitle() that are set to > NULL by those programs? I haven't tested the following small patch to > setproctitle.c, but I will test it tomorrow when I get to my development > box at work. I am sending it anyway, since someone might have the time to > check this by 09:00 EEST this morning. Nah. I just saw from CVSup'ing that revision 1.14 includes just the fix I proposed, but in a more 'correct' manner. I really love it when you guys are *so* blazingly fast :-) - giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message