[Bug libstdc++/21172] potential integer overflow error in STL heap functions

pete_a90 at yahoo dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 27 19:09:00 GMT 2005


------- 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



More information about the Gcc-bugs mailing list