summaryrefslogtreecommitdiff
path: root/user/tigervnc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-02 01:04:05 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-02 01:04:05 +0000
commit5516d5e1bc04082e1084f1ef514c8db4262eb423 (patch)
tree489b814fd2d0b9225f0fc27fc240d8dc01f4fc12 /user/tigervnc
parent100443b68023d93eae20b0328c15b36adf685c11 (diff)
downloadpackages-5516d5e1bc04082e1084f1ef514c8db4262eb423.tar.gz
packages-5516d5e1bc04082e1084f1ef514c8db4262eb423.tar.bz2
packages-5516d5e1bc04082e1084f1ef514c8db4262eb423.tar.xz
packages-5516d5e1bc04082e1084f1ef514c8db4262eb423.zip
user/tigervnc: ensure errors are thrown
Diffstat (limited to 'user/tigervnc')
-rw-r--r--user/tigervnc/APKBUILD6
-rw-r--r--user/tigervnc/ensure-throw.patch59
2 files changed, 63 insertions, 2 deletions
diff --git a/user/tigervnc/APKBUILD b/user/tigervnc/APKBUILD
index 1bbfcb8dc..3acea2e2d 100644
--- a/user/tigervnc/APKBUILD
+++ b/user/tigervnc/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=tigervnc
pkgver=1.9.0
-pkgrel=3
+pkgrel=4
pkgdesc="High-performance, platform-neutral VNC remote desktop application"
url="https://tigervnc.org/"
arch="all"
@@ -19,6 +19,7 @@ source="tigervnc-$pkgver.tar.gz::https://github.com/TigerVNC/tigervnc/archive/v$
0001-CSecurityTLS-Use-size_t-as-argument-for-new.patch
null-termination.patch
initialise-var.patch
+ ensure-throw.patch
"
build() {
@@ -47,4 +48,5 @@ sha512sums="333910f567e6b5e4a5a22d898b2d4c3f4b834cb4cc8fc13ff55d31401894c0d5122a
189a51a542b368e4db22174d09f5b656848e94577bbf93b2388f54529f1c7c2d32e5b5283551b3fb067ba21f6464f60989e22d4cd11ed3d87d5c931301555b49 endian.patch
f95328f6b669e6608b9971de3db25d5eb26a733fbe32f13291c309ed57eacba6c86461a516c3b8cdc12ff7482ee0249a45189864d473d52df81df0a3541d95b9 0001-CSecurityTLS-Use-size_t-as-argument-for-new.patch
82566734e5288e899048b918ce47f5abc3b94196e88d54fa0b0ef68c20d1fcd9d5854f36a0043d28f81dc6213c9ee8cf55fb187aeeb8add5fc31765f6a5b23bb null-termination.patch
-a7fb612d7e3625b66db66ffc7e3f28f2e47f79b858ff1fd9e403576ef2b8ff7bc8cf83a6f67439de6242e4a11a0144119d040f8f9e917e17a8af512b47067360 initialise-var.patch"
+a7fb612d7e3625b66db66ffc7e3f28f2e47f79b858ff1fd9e403576ef2b8ff7bc8cf83a6f67439de6242e4a11a0144119d040f8f9e917e17a8af512b47067360 initialise-var.patch
+4656a617dcb2bd28b653932fa034b7d46c49a08be4ba90501a9d1ddfad2130209664abf7bf5227f0afc926a568eb83e8e5f25e73887bf2561b2077fb1dab84c9 ensure-throw.patch"
diff --git a/user/tigervnc/ensure-throw.patch b/user/tigervnc/ensure-throw.patch
new file mode 100644
index 000000000..da873fe21
--- /dev/null
+++ b/user/tigervnc/ensure-throw.patch
@@ -0,0 +1,59 @@
+From 78bdd1700c4e42b492286a2af25bea0825848f99 Mon Sep 17 00:00:00 2001
+From: Pierre Ossman <ossman@cendio.se>
+Date: Tue, 26 Mar 2019 11:10:28 +0100
+Subject: [PATCH] Add missing throws for exception
+
+It is not enough to create an exception object, you need to throw
+it as well.
+---
+ common/rfb/CSecurityTLS.cxx | 10 +++++-----
+ win/rfb_win32/Registry.cxx | 2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
+index c6d1e3103..aa1910909 100644
+--- a/common/rfb/CSecurityTLS.cxx
++++ b/common/rfb/CSecurityTLS.cxx
+@@ -391,7 +391,7 @@ void CSecurityTLS::checkSession()
+ "authority:\n\n%s\n\nDo you want to save it and "
+ "continue?\n ", info.data);
+ if (len < 0)
+- AuthFailureException("certificate decoding error");
++ throw AuthFailureException("certificate decoding error");
+
+ vlog.debug("%s", info.data);
+
+@@ -417,16 +417,16 @@ void CSecurityTLS::checkSession()
+
+ if (gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, NULL, &out_size)
+ == GNUTLS_E_SHORT_MEMORY_BUFFER)
+- AuthFailureException("Out of memory");
++ throw AuthFailureException("Out of memory");
+
+ // Save cert
+ out_buf = new char[out_size];
+ if (out_buf == NULL)
+- AuthFailureException("Out of memory");
++ throw AuthFailureException("Out of memory");
+
+ if (gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, out_buf, &out_size) < 0)
+- AuthFailureException("certificate issuer unknown, and certificate "
+- "export failed");
++ throw AuthFailureException("certificate issuer unknown, and certificate "
++ "export failed");
+
+ char *homeDir = NULL;
+ if (getvnchomedir(&homeDir) == -1)
+diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx
+index 963a36a29..9cd501842 100644
+--- a/win/rfb_win32/Registry.cxx
++++ b/win/rfb_win32/Registry.cxx
+@@ -254,7 +254,7 @@ TCHAR* RegKey::getRepresentation(const TCHAR* valname) const {
+ TCharArray result(required);
+ length = ExpandEnvironmentStrings(str.buf, result.buf, required);
+ if (required<length)
+- rdr::Exception("unable to expand environment strings");
++ throw rdr::Exception("unable to expand environment strings");
+ return result.takeBuf();
+ } else {
+ return tstrDup(_T(""));