← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 321246] Re: ClientManager::findLegacyUser(), assertion "aNick.size() > 0" fails

 

I committed a fix to dc++ (linuxdcpp fix to come later). This fix simply
checks if the params are non-empty inside SearchManager before
continuing. What'd I'd prefer to do is validate that the text is utf-8,
but I don't think SearchManager is the proper place for that. I think
from a design perspective it makes more sense for NmdcHub to handle the
conversion of all NMDC commands. I propose that we consolidate all of
our conversion and validation logic inside the beginning of
NmdcHub::onLine() similar to how we now validate ADC commands (see bug
#300268). Right now the conversion to utf8 is done in multiple places
inside onLine() and is sometimes even delegated to other classes as in
the case with SearchManager. As a result, SearchManager has to lookup
the hub's encoding separately inside onData() whereas if we did it in
NmdcHub it would already be aware of the encoding. Also, right now we do
not validate that the text was converted successfully as we do with ADC.
I recommend we both convert and validate the entire command at the
beginning of NmdcHub::onLine(). Arne/Poy thoughts?

** Changed in: dcplusplus
   Importance: Undecided => Low

** Changed in: dcplusplus
       Status: New => Fix Committed

** Changed in: dcplusplus
     Assignee: (unassigned) => Steven Sheehy (steven-sheehy)

-- 
ClientManager::findLegacyUser(), assertion "aNick.size() > 0" fails
https://bugs.launchpad.net/bugs/321246
You received this bug notification because you are a member of LinuxDC++
Team, which is subscribed to LinuxDC++.

Status in DC++: Fix Committed
Status in Linux DC++: Confirmed

Bug description:
I have no idea why this happened. I was doing some testing (tried and true random clicking) on some Russian hub, and I can't make it happen again. The address of the hub was lost when the application failed assertion, unfortunately.

linuxdcpp: dcpp/ClientManager.cpp:187: dcpp::UserPtr dcpp::ClientManager::findLegacyUser(const std::string&) const: Försäkran "aNick.size() > 0" falsk.