wwiv icon indicating copy to clipboard operation
wwiv copied to clipboard

Network3 crashing repeatedly.

Open BloodStoneBBS opened this issue 2 years ago • 4 comments

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?

BloodStoneBBS avatar Aug 27 '22 17:08 BloodStoneBBS

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?

BloodStoneBBS avatar Aug 28 '22 03:08 BloodStoneBBS

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.

ericpareja avatar Sep 05 '22 06:09 ericpareja

Here is the bbslist.net file with the non-shorted @137 node name which caused the network3 crash in the latest version. bbslist.zip

MarkHofmann11 avatar Sep 05 '22 14:09 MarkHofmann11

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?

ericpareja avatar Sep 05 '22 19:09 ericpareja

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.

wwiv avatar Nov 11 '22 03:11 wwiv