Re: Stack growth direction to thwart buffer overflow attacks
From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 08/19/03
- Next message: Barry Margolin: "Re: Stack growth direction to thwart buffer overflow attacks"
- Previous message: Nick Maclaren: "Re: Stack growth direction to thwart buffer overflow attacks"
- In reply to: Frank Cusack: "Re: Stack growth direction to thwart buffer overflow attacks"
- Next in thread: Barry Margolin: "Re: Stack growth direction to thwart buffer overflow attacks"
- Reply: Barry Margolin: "Re: Stack growth direction to thwart buffer overflow attacks"
- Reply: Frank Cusack: "Re: Stack growth direction to thwart buffer overflow attacks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 19 Aug 2003 15:04:30 GMT
Frank Cusack <fcusack@fcusack.com> writes:
>How utterly idiotic. strncat appends up to count characters, PLUS ONE.
>I don't have any reference handy (why is it always in "my other pants"?)
>but I'll be surprised if that's how the C99 strncat works.
It appends at most N characters; *not* "plus one"; the first appended
character overwrites the NUL terminator currently present.
(I..e, the minimal amount of storage required to hold the
string will increase with at most "n")
I'd be very surprised if C99 deviated from this defacto definition of
strncat().
Casper
-- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth.
- Next message: Barry Margolin: "Re: Stack growth direction to thwart buffer overflow attacks"
- Previous message: Nick Maclaren: "Re: Stack growth direction to thwart buffer overflow attacks"
- In reply to: Frank Cusack: "Re: Stack growth direction to thwart buffer overflow attacks"
- Next in thread: Barry Margolin: "Re: Stack growth direction to thwart buffer overflow attacks"
- Reply: Barry Margolin: "Re: Stack growth direction to thwart buffer overflow attacks"
- Reply: Frank Cusack: "Re: Stack growth direction to thwart buffer overflow attacks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]