multilineedit: handle unterminated mIRC codes
authorA. Wilcox <AWilcox@Wilcox-Tech.com>
Mon, 3 Jun 2019 05:16:30 +0000 (00:16 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 9 Jan 2020 19:11:28 +0000 (20:11 +0100)
commitb359cfe9fdd2427993dc0b2f3f605fd69bbe6bd2
treec9c08fa24f688655af4f14c23cacfa64fe747bfb
parent3e800ec6553158aa0da3b08da78083d587389914
multilineedit: handle unterminated mIRC codes

Currently, if an unterminated mIRC code is pasted into Quassel, trying to
go through input line history will cause a deadlock.  This breaks the loop
at the cost of possibly mangling the formatting of the line somewhat.
This is seen as more acceptable than locking up, and the line is invalid
anyway.

Reproducer:

```sh
printf '\00303,08HONK' | xclip -selection clipboard
```

Paste into Quassel, send, press Up arrow key.

Bug originally found by @sroracle, reported to Adélie Linux, patched by
yours truly.
src/uisupport/multilineedit.cpp