From owner-freebsd-hackers Wed Feb 12 20:11:11 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA16432 for hackers-outgoing; Wed, 12 Feb 1997 20:11:11 -0800 (PST) Received: from wong.rogerswave.ca (a17b32.rogerswave.ca [204.92.17.32]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA16426 for ; Wed, 12 Feb 1997 20:11:07 -0800 (PST) Received: (from wong@localhost) by wong.rogerswave.ca (8.8.5/8.7.3) id XAA00379; Wed, 12 Feb 1997 23:11:06 -0500 (EST) Date: Wed, 12 Feb 1997 23:11:01 -0500 (EST) From: Ken Wong X-Sender: wong@wong.rogerswave.ca Reply-To: wong@rogerswave.ca To: Joerg Wunsch cc: "Daniel O'Callaghan" , hackers@freebsd.org Subject: Re: strlen() question, maybe str*cpy 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 Wed, 12 Feb 1997, J Wunsch wrote: > Why? The worst that would happen by touching off the end of your > address space is a SIGSEGV. The problem with str*cpy() touching > beyond the bounds of their arrays is that they can _modify_ the stack > then, but that can't happen with strlen() since it doesn't modify > anything. why isn't the str*cpy check the BP (base pointer?) register and use it to gaurd against stack over right? Ken