From owner-freebsd-hackers Thu Feb 20 15:24:17 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA14900 for hackers-outgoing; Thu, 20 Feb 1997 15:24:17 -0800 (PST) Received: from flea.best.net (root@flea.best.net [206.184.139.131]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA14855; Thu, 20 Feb 1997 15:23:43 -0800 (PST) Received: (from dillon@localhost) by flea.best.net (8.8.5/8.8.3) id PAA19571; Thu, 20 Feb 1997 15:22:27 -0800 (PST) Date: Thu, 20 Feb 1997 15:22:27 -0800 (PST) From: Matt Dillon Message-Id: <199702202322.PAA19571@flea.best.net> To: Guido van Rooij Cc: guido@gvr.win.tue.nl (Guido van Rooij), gurney_j@resnet.uoregon.edu, top@sonic.cris.net, audit-bin@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG Subject: Re: hmm Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk :Guido van Rooij wrote: :> > > It seems a bit strange to me. Just like the first part of the line :> > > underneath btw: :> > > if (*p != '\0' && p[strlen(p) - 1] == '[') { :> > > ^^^^^^^^^^ :> > :> > that makes sure that the strlen(p) > 0... you wouldn't want to access :> > p[-1] would you?? :> > :> > hope this helps... ttyl.. :> > :> :> But p points to argv[0]. According to me that is always non-empty. : :Hmm...After rereading this, I think I have it wrong :-(). That's what you get :with quick answers. The check is indeed necessary. : :-Guido The check should probably be in there, but it not being there is not likely to cause a security hole since page 0 is write-protected on FreeBSD machines. -Matt Matthew Dillon Engineering, BEST Internet Communications, Inc. [always include a portion of the original email in any response!]