This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19351] operator new[] can return heap blocks which are too small
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2007 15:09:45 -0000
- Subject: [Bug c++/19351] operator new[] can return heap blocks which are too small
- References: <bug-19351-192@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from schwab at suse dot de 2007-03-23 15:09 -------
"The calloc function allocates space for an array of nmemb objects, each of
whose size is size."
There is no mentioning of overflow, but the allocated space must surely be big
enough to hold the array, and calloc shall fail if it cannot fulfill the
request.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19351