This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/21172] potential integer overflow error in STL heap functions
- From: "pete_a90 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Apr 2005 19:09:09 -0000
- Subject: [Bug libstdc++/21172] potential integer overflow error in STL heap functions
- References: <20050423091348.21172.pete_a90@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pete_a90 at yahoo dot com 2005-04-27 19:09 -------
I know there are no practical risks to this (heap isn't that popular and it's practically impossible to allocate an array that large) but it won't work if the user made a custom iterator with unsigned char as the size_type and signed char as the distance_type on a machine with small chars. The initialization of __secondChild isn't the problem, it's the updating of it in the loop that will cause it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21172