Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2000 05:09:58 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/gen setproctitle.c
Message-ID:  <20001204050958.A16559@hades.hell.gr>
In-Reply-To: <200012040235.eB42Z3A16145@hades.hell.gr>; from keramida@ceid.upatras.gr on Mon, Dec 04, 2000 at 04:35:03AM %2B0200
References:  <200012040145.eB41jw809701@freefall.freebsd.org> <200012040235.eB42Z3A16145@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 04, 2000 at 04:35:03AM +0200, Giorgos Keramidas wrote:
> John Polstra <jdp@FreeBSD.ORG> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001204050958.A16559>