From owner-freebsd-hackers Sat Feb 22 12:31:48 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA16141 for hackers-outgoing; Sat, 22 Feb 1997 12:31:48 -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 MAA16083; Sat, 22 Feb 1997 12:31:25 -0800 (PST) Received: from localhost (abelits@localhost) by phobos.illtel.denver.co.us (8.8.5/8.6.9) with SMTP id MAA30832; Sat, 22 Feb 1997 12:35:09 -0800 Date: Sat, 22 Feb 1997 12:35:09 -0800 (PST) From: 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: <199702221811.LAA04865@phaeton.artisoft.com> 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, 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. -- Alex