wwiv
wwiv copied to clipboard
Network3 crashing repeatedly.
Build 5.8.0.3600, Windows 10 w32
Have been out of town for a couple of weeks, came home and netwoek3 constantly crashing.
Debug:
Unhandled exception at 0x75D7D132 (ucrtbase.dll) in network3.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.
Tips?
Noticed new bbslist.net file. Deleted new line "@137 *999-999-INET #33600 ! [ ] "Public Electronic Networked Information System"" saved and tested. No more crashing. BBS Name too long?
I drilled through the code. The BBS Name exceeds the net_system_list_rec.name length of 40-1=39 characters, which is what I am assuming crashes network3 in BbsListNet::ParseBbsListNet and related functions. Maximum system name for the network would be 39 characters. I'm guessing that the fix for this would involve truncating oversized names to fit the 39 character limit in the code.
Here is the bbslist.net file with the non-shorted @137 node name which caused the network3 crash in the latest version. bbslist.zip
Suggested fix in sdk/bbslist.cpp line 131-138:
case '\"': {
++iter; // skip past first "
string name;
while (iter != ss.end() && *iter != '\" && iter < 40) { // ensure name is not more than 39 chars
name.push_back(*iter++);
}
to_char_array(con->name, name);
}
Since I don't have a Windows setup, I can't test if this fix will work. Can someone try building it on Windows and test with the bbslist.zip that Mark attached above?
better fix is to use to_char_array_trim for all cases in this file, since a string too long is not a programming error.