#55 Uninitialised variable in ICMPv4PacketImpl.cpp

closed
None
5
2012-09-14
2008-12-25
Alex Fabijanic
No

There is an uninitialised variable bug in ICMPv4PacketImpl.cpp. initPacket() reads _seq which is not set in the constructor. The solution is to change line 127 to

ICMPv4PacketImpl::ICMPv4PacketImpl(int dataSize):
ICMPPacketImpl(dataSize),_seq(0)
{
initPacket();
}

(Notice the _seq(0) at the end)

Discussion

  • Alex Fabijanic
    Alex Fabijanic
    2009-01-13

    fixed in trunk, rev 1016