Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 1997 17:12:41 -0500 (EST)
From:      Ken Wong <wong@a17b32.rogerswave.ca>
To:        Zach Heilig <zach@blizzard.gaffaneys.com>
Cc:        hackers@freebsd.org
Subject:   Re: strlen() question, maybe str*cpy
Message-ID:  <Pine.BSF.3.91.970216171052.393A-100000@wong.rogerswave.ca>
In-Reply-To: <87iv3xl2rc.fsf@murkwood.gaffaneys.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 12 Feb 1997, Zach Heilig wrote:

> Ken Wong <wong@a17b32.rogerswave.ca> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970216171052.393A-100000>