[Bug c++/19172] strcpy bug? or mine?
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 28 01:34:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-28 01:34 -------
That is the bug:
word = new char( strlen(str) +1);
should be:
word = new char[ strlen(str) +1];
Otherwise you are allocating only one char.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19172
More information about the Gcc-bugs
mailing list