BugTraq
Name:
Email:
*Note: Email address will appear as "user domain ext" to prevent harvesting.
Subject:
Message:
 
Re: gcc 4.1 bug miscompiles pointer range checks, may place you at risk Apr 18 2006 09:21AM
Gabor Gombas (gombasg sztaki hu)
On Mon, Apr 17, 2006 at 10:03:54PM +0200, Felix von Leitner wrote:

> static inline int range_ptrinbuf(const void* buf,unsigned long len,const void* ptr) {
> register const char* c=(const char*)buf; /* no pointer arithmetic on void* */
> return (c && c+len>c && (const char*)ptr-c<len);
> }
...

[ more ]  
 

Privacy Statement
Copyright 2010, SecurityFocus