From owner-freebsd-hackers Sun Feb 16 14:13:09 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA00546 for hackers-outgoing; Sun, 16 Feb 1997 14:13:09 -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 OAA00535 for ; Sun, 16 Feb 1997 14:12:50 -0800 (PST) Received: (from wong@localhost) by wong.rogerswave.ca (8.8.5/8.7.3) id RAA00401; Sun, 16 Feb 1997 17:12:42 -0500 (EST) Date: Sun, 16 Feb 1997 17:12:41 -0500 (EST) From: Ken Wong X-Sender: wong@wong.rogerswave.ca Reply-To: wong@rogerswave.ca To: Zach Heilig cc: hackers@freebsd.org Subject: Re: strlen() question, maybe str*cpy In-Reply-To: <87iv3xl2rc.fsf@murkwood.gaffaneys.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 12 Feb 1997, Zach Heilig wrote: > Ken Wong writes: > > > why isn't the str*cpy check the BP (base pointer?) register > > and use it to gaurd against stack over right? > > Are you certain that all strings are allocated on the stack? I'm > pretty sure there are some in the bss and others that are malloc()'d > as well... If that was the case, then there is not problem with stack overflow. instead, you will get a seg fault or bus error when gone beyond. Ken