summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-03 05:23:01 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-03 05:23:01 +0000
commit5641b34207407e26e9265721f068efed6b118a99 (patch)
treec3ee1685dea48aaa06ffbda3b74425aa650e296b
parent76b6b9adadf678385640651a4ef4996af439260c (diff)
downloadpackages-5641b34207407e26e9265721f068efed6b118a99.tar.gz
packages-5641b34207407e26e9265721f068efed6b118a99.tar.bz2
packages-5641b34207407e26e9265721f068efed6b118a99.tar.xz
packages-5641b34207407e26e9265721f068efed6b118a99.zip
user/quassel: fix hang on unterminated mIRC codes in input box
-rw-r--r--user/quassel/APKBUILD9
-rw-r--r--user/quassel/unterminated-mIRC-codes.patch40
2 files changed, 46 insertions, 3 deletions
diff --git a/user/quassel/APKBUILD b/user/quassel/APKBUILD
index 695fd4e4b..f9f583de7 100644
--- a/user/quassel/APKBUILD
+++ b/user/quassel/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=quassel
pkgver=0.13.1
-pkgrel=0
+pkgrel=1
pkgdesc="Modern, cross-platform IRC client"
url="https://quassel-irc.org/"
arch="all"
@@ -14,7 +14,9 @@ makedepends="qt5-qtbase-dev qt5-qtmultimedia-dev libdbusmenu-qt-dev sonnet-dev
kwidgetsaddons-dev qca-dev qt5-qttools-dev zlib-dev libexecinfo-dev"
langdir="/usr/share/quassel/translations"
subpackages="$pkgname-core $pkgname-client $pkgname-lang"
-source="https://quassel-irc.org/pub/quassel-$pkgver.tar.bz2"
+source="https://quassel-irc.org/pub/quassel-$pkgver.tar.bz2
+ unterminated-mIRC-codes.patch
+ "
# secfixes:
# 0.12.5-r0:
@@ -74,4 +76,5 @@ core() {
mv "$pkgdir"/usr/bin/quasselcore "$subpkgdir"/usr/bin/
}
-sha512sums="4ed55e81b1638c8851ddae5d9c9d23a1c2cea92f307e19f426873c2600d8e183898d3ed7c290f2ea5d1b8c5e1be7f9ffcc3e8c3c0193d080fc879b10cc3a962c quassel-0.13.1.tar.bz2"
+sha512sums="4ed55e81b1638c8851ddae5d9c9d23a1c2cea92f307e19f426873c2600d8e183898d3ed7c290f2ea5d1b8c5e1be7f9ffcc3e8c3c0193d080fc879b10cc3a962c quassel-0.13.1.tar.bz2
+7f5ffa64d0620061ac2b6eab2e163d5862d43b16e3d7572415b5819f9ee19a5482791c3cee20c3b99722f05ffed3f1f3ba6c82e7f78b6bea9170037675dd3b4a unterminated-mIRC-codes.patch"
diff --git a/user/quassel/unterminated-mIRC-codes.patch b/user/quassel/unterminated-mIRC-codes.patch
new file mode 100644
index 000000000..8cedeb461
--- /dev/null
+++ b/user/quassel/unterminated-mIRC-codes.patch
@@ -0,0 +1,40 @@
+From 391cdf6c2595060ff3b2adb54f5b2fc8ebd7cc04 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Mon, 3 Jun 2019 00:16:30 -0500
+Subject: [PATCH] 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.
+---
+ src/uisupport/multilineedit.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp
+index 133a2433..b13834c5 100644
+--- a/src/uisupport/multilineedit.cpp
++++ b/src/uisupport/multilineedit.cpp
+@@ -645,6 +645,10 @@ QString MultiLineEdit::convertMircCodesToHtml(const QString &text)
+ }
+
+ posRight = text.indexOf(mircCode.cap(), posRight + 1);
++ if (posRight == -1) {
++ words << text.mid(posLeft);
++ break; // unclosed color code; can't process
++ }
+ words << text.mid(posLeft, posRight + 1 - posLeft);
+ posLeft = posRight + 1;
+ }
+--
+2.21.0
+