#212 uninitialized variable bug in TCPServer

v2.6x
closed-accepted
Filters (75)
5
2011-11-21
2011-11-19
SAPikachu
No

My program uses TCPServer internally, I found it always crash when client disconnects. It seems that TCPRecievePacket::data may be uninitalized when TCPRecievePacket is destructed. I added "data = NULL;" to the beginning of TCPRecievePacket::TCPRecievePacket and the problem seems solved.

Discussion

  • Ian Brabham

    Ian Brabham - 2011-11-21
    • assigned_to: nobody --> ianb1957
    • status: open --> closed-accepted
     
  • Ian Brabham

    Ian Brabham - 2011-11-21

    Thanks, not exactly sure how dataSize>0 and data uninitalized happens. Maybe malloc failure?

    I have initialised all the variables in the class TCPRecievePacket.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks