This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ACATS c380004


* Richard Kenner:

>     Well, the information from valgrind shows that bad code is being
>     produced (eg: silly arg (-2147483640) to malloc()).  
>
> Right.  It's trying to allocate an amount of memory that overflows because
> it thinks it needs to allocate an array of 2**32 entries.  This can either
> end up allocating zero bytes, a negative number, or a large positive
> number depending on lot of random things.

Actually, this is a security issue.  I've even written an advisory for
it, but I received hardly any feedback.

  <http://cert.uni-stuttgart.de/advisories/calloc.php>

operator new[] in C++ is also affected.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]