summaryrefslogtreecommitdiff
path: root/user/tigervnc/null-termination.patch
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
committerCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
commit9297468fa579836e3a6a381b798feb6b78217c2d (patch)
tree53168212f427afbcf0693b534530a4af803152e9 /user/tigervnc/null-termination.patch
parenta63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff)
parentda5a69b65a8791fffa6e93366ee585f87eff136d (diff)
downloadpackages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip
Merge branch 'master' into zfs
Diffstat (limited to 'user/tigervnc/null-termination.patch')
-rw-r--r--user/tigervnc/null-termination.patch39
1 files changed, 0 insertions, 39 deletions
diff --git a/user/tigervnc/null-termination.patch b/user/tigervnc/null-termination.patch
deleted file mode 100644
index e80a4f62d..000000000
--- a/user/tigervnc/null-termination.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 7240f62ddc06643f982456c05c11d8afe5422069 Mon Sep 17 00:00:00 2001
-From: Pierre Ossman <ossman@cendio.se>
-Date: Tue, 26 Mar 2019 11:11:20 +0100
-Subject: [PATCH] Handle server name overflow properly
-
-We need to make sure it is null terminated on truncation. We also
-need to avoid giving a too large size argument or modern gcc will
-complain.
----
- vncviewer/vncviewer.cxx | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
-index d7cbd6e36..4a8370b95 100644
---- a/vncviewer/vncviewer.cxx
-+++ b/vncviewer/vncviewer.cxx
-@@ -411,7 +411,8 @@ potentiallyLoadConfigurationFile(char *vncServerName)
- newServerName = loadViewerParameters(vncServerName);
- // This might be empty, but we still need to clear it so we
- // don't try to connect to the filename
-- strncpy(vncServerName, newServerName, VNCSERVERNAMELEN);
-+ strncpy(vncServerName, newServerName, VNCSERVERNAMELEN-1);
-+ vncServerName[VNCSERVERNAMELEN-1] = '\0';
- } catch (rfb::Exception& e) {
- vlog.error("%s", e.str());
- if (alertOnFatalError)
-@@ -541,8 +542,10 @@ int main(int argc, char** argv)
- try {
- const char* configServerName;
- configServerName = loadViewerParameters(NULL);
-- if (configServerName != NULL)
-- strncpy(defaultServerName, configServerName, VNCSERVERNAMELEN);
-+ if (configServerName != NULL) {
-+ strncpy(defaultServerName, configServerName, VNCSERVERNAMELEN-1);
-+ defaultServerName[VNCSERVERNAMELEN-1] = '\0';
-+ }
- } catch (rfb::Exception& e) {
- vlog.error("%s", e.str());
- if (alertOnFatalError)