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:




bugtraq logo Bugtraq mailing list archives

Re: gcc 4.1 bug miscompiles pointer range checks, may place you at risk
From: leonleon77 () hotmail com
Date: 3 May 2006 07:21:09 -0000

perhaps instead of "c + len > c" being the test of pointer wraparound, one may use the following (if there is a desire 
to use pointer-based arithmetic)...

#define MAXPTR (char *)0xffffffff // this would differ on 64 bit systems

if (MAXPTR - c < len)
{
// we have a pointer wraparound...
}


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]