Bad NMDC validation messes up LinuxDC++ chat formatting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Won't Fix
|
Undecided
|
Unassigned | ||
LinuxDC++ |
Fix Released
|
Medium
|
Razzloss |
Bug Description
Seen at least on one hub out in the wild, which terminated actions/emotes in chat with \0 instead of proper |. E.g. Hub commands sent with '+me is going to lose his mind with this' were sent out by hub as * razzloss is going to his mind with this\0 The ClientListener Status message fired from this then contained this line and the next commands send by the hub until valid termination character was found.
Windows clients apparently behaved as everything went fine (since no-one hadn't bothered to fix the problem and they saw the messages). So I'd imagine Windows chat messages are strcpy'd at some point, so that they end at correct place (and won't output the following commands to chat).
LinuxDC++ on the otherhand passes the length of the string from the fired StatusMessage to gtk_text_
So how do we fix this? At minimum the italicizing should be corrected, but should some validation be added to dcpp, so that messages like this won't get up to the GUI level?
Quick fix which will show the emote line correctly is to change the len parameter passed to gtk_text_
edit: DC++ core version used was 0.75 (also happened with released linuxdcpp with 0.698 core)
Related branches
description: | updated |
tags: |
added: ui removed: gui |
Changed in dcplusplus: | |
status: | New → Won't Fix |
Changed in linuxdcpp: | |
status: | Fix Committed → Fix Released |
This behavior can be seen with the attached 'hub'. Replace the razzloss in 9th line with the nick used by your client.