Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Vulnerability Development: Re: Secure coding in C (was Re: Administrivia #4883)

Re: Secure coding in C (was Re: Administrivia #4883)

From: Valery Dachev <valery_at_LINUX.HOME.BG>
Date: Mon, 17 Jan 2000 11:25:20 +0200

On Sun, 16 Jan 2000, spin0ff wrote:
> both strlen call will return when they encounter a \0, implying that after
> the third line, len will be long enough to hold a, b and the garbage
> following both a and b. c will be large enough to hold all of this.

Lucky you ! You have encountered the \0 symbol after your buffer and
before the end of the segment. Take a look at the situation where the \0
symbol is not there. Your program can explode with "Segmentation
fault" (or "Segmentation violation" in Windows). There's a simple example
in the attachment.
Bye.

..........................................................................
:Name : Valery Dachev :Organization: Linux Society of Bulgaria :
:E-Mail : valery_at_linux.home.bg :E-Mail : info_at_linux.home.bg :
:Homepage: --- none --- :Homepage : http://linux.home.bg :
:........:......................:............:...........................:

<HR NOSHADE>
<UL>
<LI>TEXT/PLAIN attachment: Say 'BooM' !
</UL>
Received on Jan 17 2000

[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
edgeos