[Bug c++/21189] weird behavior
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Apr 24 14:46:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-24 14:46 -------
Actually this is a bug in your code:
Signature::Signature(unsigned char* str, size_t vlen)
{
sig = new unsigned char[len];
len = vlen;
...
len is not assigned so you are using an uninitialized variable. Switching the order of the above
statements around fixes the problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21189
More information about the Gcc-bugs
mailing list