← Back to team overview

linuxdcpp-team team mailing list archive

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

 

Right, I agree that nicks and filenames should be treated as binary
except for display (bug #351208), but my point was that we should
validate any nmdc text we convert to utf-8 is actually non-empty and
utf-8 before using it. My proposed solution was perhaps not the
greatest, but that's of course changeable. Note that I was not proposing
that we should send utf-8 to other nmdc clients, only that we should
convert and validate received nmdc commands to utf-8 before handling
them (right now we only convert).

My other point was that right now the conversion of nmdc params to utf-8
is spread around in other classes. I think it would be better to
encapsulate this conversion inside NmdcHub so that data can be converted
and validated as soon as it comes down the tubes and so that other
classes can focus on their designated role instead of worrying about
text conversion/validation.

I should also note that the peer can send a space or empty string for
nick in $SR and still crash debug builds, so the fix I committed would
still be needed regardless of encoding issues. Perhaps we should just
remove the dcassert?

-- 
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.