Date: Thu, 20 Feb 1997 15:22:27 -0800 (PST) From: Matt Dillon <dillon@best.net> To: Guido van Rooij <guido@gvr.win.tue.nl> 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 Message-ID: <199702202322.PAA19571@flea.best.net>
next in thread | raw e-mail | index | archive | help
: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. <dillon@best.net> [always include a portion of the original email in any response!]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702202322.PAA19571>