From owner-freebsd-hackers Sat Feb 22 13:26:53 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA19839 for hackers-outgoing; Sat, 22 Feb 1997 13:26:53 -0800 (PST) Received: from phobos.illtel.denver.co.us (abelits@phobos.illtel.denver.co.us [207.33.75.1]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA19766; Sat, 22 Feb 1997 13:24:43 -0800 (PST) Received: from localhost (abelits@localhost) by phobos.illtel.denver.co.us (8.8.5/8.6.9) with SMTP id NAA31172; Sat, 22 Feb 1997 13:28:38 -0800 Date: Sat, 22 Feb 1997 13:28:37 -0800 (PST) From: Alex Belits Reply-To: Alex Belits To: Terry Lambert cc: guido@gvr.win.tue.nl, dillon@best.net, gurney_j@resnet.uoregon.edu, top@sonic.cris.net, audit-bin@freebsd.org, FreeBSD-hackers@freebsd.org Subject: Re: hmm In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 22 Feb 1997, Alex Belits wrote: > On Sat, 22 Feb 1997, Terry Lambert wrote: > > > > with p="" > > > *p != '\0' && p[strlen(p) - 1] == '[' _still_ will read a byte p[-1]. > > > > What? > > > > IF p = "" > > THEN *p = '\0' > > > > by definition of ""... > > but p[strlen(p) - 1] will be p[-1] > Optimization done by compiler may skip it, but depending on that will be > rather dangerous. Hmm, sorry, I've not noticed that it's && -- Alex