dl5di / OpenDV

Open Digital Voice software for Amateur Radio based on Jonathan Naylor's (G4KLX) "ircDDBGateway" and "PCRepeaterController" for D-Star
GNU General Public License v2.0
106 stars 63 forks source link

This commit solves the issue https://github.com/dl5di/OpenDV/issues/47 #48

Closed F4FXL closed 8 years ago

F4FXL commented 8 years ago

It all starts in the DPlusHandler constructor wher eband char is added to m_callsign. If m_callssign is smaller than LONG_CALLSIGN_LENGTH the band char gets added "somewhere" (overrun ?) SetChar does not complain about a char being set outside the string boundaries. In the end when the DPlushandler gets deleted its internal members gets deleted also and we get an error from wxString destructor about freeing the wrong size. What I did to solve the issue :

g4klx commented 8 years ago

Could you use the resize method on wxString instead of Append and Truncate, it's cleaner. I like the change, does it need applying to DCS and DExtra also?

F4FXL commented 8 years ago

Hi Jonathan,

I will amend to use Resize.
I did not check DCS and DExtra as they both were working fine. Will have a look at it this evening.

I also noticed that m_header gets delted even if there is nothing to delete (if pointer is null)

F4FXL commented 8 years ago

Changed to resize... Will check Dextra and DCS this evenning

F4FXL commented 8 years ago

I made some changes to DExtra and DCS in the same manner.