Re: Avoiding Buffer Overflows
From: David Correa (tech@linux-tech.com)Date: 01/09/02
- Previous message: Trano: "Re: SV: Avoiding Buffer Overflows"
- In reply to: Trano: "Re: Avoiding Buffer Overflows"
- Next in thread: S. Sargent \: "Re: Avoiding Buffer Overflows"
- Reply: S. Sargent \: "Re: Avoiding Buffer Overflows"
- Reply: Allan M. Stewart: "Re: Avoiding Buffer Overflows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 9 Jan 2002 13:08:07 -0800 (PST) From: David Correa <tech@linux-tech.com> To: security-discuss@linuxsecurity.com
On Tue, 8 Jan 2002, Trano wrote:
> #include <stdio.h>
>
> int
> main(int argc, char **argv)
> {
> char buf[100];
> strcpy(buf, argv[1]);
> exit(1);
> }
Hi,
That code produces a "Segmentation fault (core dumped)"
with gcc version 2.96.
Also this one:
On Wed, 9 Jan 2002, Kenny Colliander wrote:
>#include <stdio.h>
>int main(int argc, char **argv)
>{
> char buf[100+1]; // + NULL
> strncpy(argv[1], buf, 100);
> exit(1);
>}
Regards,
David Correa RHCE CCNA
http://www.linux-tech.com
------------------------------------------------------------------------
To unsubscribe email security-discuss-request@linuxsecurity.com
with "unsubscribe" in the subject of the message.
- Previous message: Trano: "Re: SV: Avoiding Buffer Overflows"
- In reply to: Trano: "Re: Avoiding Buffer Overflows"
- Next in thread: S. Sargent \: "Re: Avoiding Buffer Overflows"
- Reply: S. Sargent \: "Re: Avoiding Buffer Overflows"
- Reply: Allan M. Stewart: "Re: Avoiding Buffer Overflows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]