Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Adélie Package Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adélie Linux
Adélie Package Tree
Commits
64060931
Verified
Commit
64060931
authored
5 years ago
by
Anna Wilcox
Browse files
Options
Downloads
Patches
Plain Diff
user/tigervnc: Fix build on Intel platforms, use new \0 patch
parent
7ecd99f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
user/tigervnc/APKBUILD
+5
-3
5 additions, 3 deletions
user/tigervnc/APKBUILD
user/tigervnc/initialise-var.patch
+24
-0
24 additions, 0 deletions
user/tigervnc/initialise-var.patch
user/tigervnc/null-termination.patch
+39
-0
39 additions, 0 deletions
user/tigervnc/null-termination.patch
with
68 additions
and
3 deletions
user/tigervnc/APKBUILD
+
5
−
3
View file @
64060931
...
...
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname
=
tigervnc
pkgver
=
1.9.0
pkgrel
=
2
pkgrel
=
3
pkgdesc
=
"High-performance, platform-neutral VNC remote desktop application"
url
=
"https://tigervnc.org/"
arch
=
"all"
...
...
@@ -17,7 +17,8 @@ source="tigervnc-$pkgver.tar.gz::https://github.com/TigerVNC/tigervnc/archive/v$
use-intltool.patch
endian.patch
0001-CSecurityTLS-Use-size_t-as-argument-for-new.patch
0002-vncviewer-Ensure-buffer-always-has-0-termination.patch
null-termination.patch
initialise-var.patch
"
build
()
{
...
...
@@ -45,4 +46,5 @@ sha512sums="333910f567e6b5e4a5a22d898b2d4c3f4b834cb4cc8fc13ff55d31401894c0d5122a
5c1cee98b7ba41c7cf121480fdfe16d5ef17c9562ff2ba3ea4e74235161fc63e2e3ed63e788c0aa999610b660b394c1269d6fdcc9716c5563651fd67d723f619 use-intltool.patch
189a51a542b368e4db22174d09f5b656848e94577bbf93b2388f54529f1c7c2d32e5b5283551b3fb067ba21f6464f60989e22d4cd11ed3d87d5c931301555b49 endian.patch
f95328f6b669e6608b9971de3db25d5eb26a733fbe32f13291c309ed57eacba6c86461a516c3b8cdc12ff7482ee0249a45189864d473d52df81df0a3541d95b9 0001-CSecurityTLS-Use-size_t-as-argument-for-new.patch
f7282c7c12e51878540be7dd45b9a00ea5d54fa13fe0cfe90f003c1b36f410ce023dfa64c64d1fb3923955c6459d25e1afe7b504651b4e9e8a2f6f9ac9e51b83 0002-vncviewer-Ensure-buffer-always-has-0-termination.patch"
82566734e5288e899048b918ce47f5abc3b94196e88d54fa0b0ef68c20d1fcd9d5854f36a0043d28f81dc6213c9ee8cf55fb187aeeb8add5fc31765f6a5b23bb null-termination.patch
a7fb612d7e3625b66db66ffc7e3f28f2e47f79b858ff1fd9e403576ef2b8ff7bc8cf83a6f67439de6242e4a11a0144119d040f8f9e917e17a8af512b47067360 initialise-var.patch"
This diff is collapsed.
Click to expand it.
user/tigervnc/initialise-var.patch
0 → 100644
+
24
−
0
View file @
64060931
From 44cf1d64ecf80c061c0a2b0f0167094e58782102 Mon Sep 17 00:00:00 2001
From: Pierre Ossman <ossman@cendio.se>
Date: Mon, 25 Mar 2019 16:14:49 +0100
Subject: [PATCH] Don't use un-initialized stride to base constructor
We can use a dummy value here as we set up the buffer and stride
further down in the constructor.
---
vncviewer/PlatformPixelBuffer.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vncviewer/PlatformPixelBuffer.cxx b/vncviewer/PlatformPixelBuffer.cxx
index 1e9803eb2..ff1935e74 100644
--- a/vncviewer/PlatformPixelBuffer.cxx
+++ b/vncviewer/PlatformPixelBuffer.cxx
@@ -36,7 +36,7 @@
static rfb::LogWriter vlog("PlatformPixelBuffer");
PlatformPixelBuffer::PlatformPixelBuffer(int width, int height) :
FullFramePixelBuffer(rfb::PixelFormat(32, 24, false, true,
255, 255, 255, 16, 8, 0),
- width, height, 0, stride),
+ width, height, NULL, 0),
Surface(width, height)
#if !defined(WIN32) && !defined(__APPLE__)
, shminfo(NULL), xim(NULL)
This diff is collapsed.
Click to expand it.
user/tigervnc/
0002-vncviewer-Ensure-buffer-always-has-0
-termination.patch
→
user/tigervnc/
null
-termination.patch
+
39
−
0
View file @
64060931
From f01feaa6d235b40e659bf808ce66acc2b9a93da1 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Wed, 20 Mar 2019 13:28:36 -0500
Subject: [PATCH 2/2] vncviewer: Ensure buffer always has \0 termination
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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
Building from the 1.9.0 tarball using GCC 8.3.0 on Linux yields the following:
tigervnc-1.9.0/vncviewer/vncviewer.cxx: In function ‘int main(int, char**)’:
tigervnc-1.9.0/vncviewer/vncviewer.cxx:527:14: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 64 equals destination size [-Werror=stringop-truncation]
strncpy(defaultServerName, configServerName, VNCSERVERNAMELEN);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void potentiallyLoadConfigurationFile(char*)’,
inlined from ‘int main(int, char**)’ at tigervnc-1.9.0/vncviewer/vncviewer.cxx:557:35:
tigervnc-1.9.0/vncviewer/vncviewer.cxx:396:14: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 64 equals destination size [-Werror=stringop-truncation]
strncpy(vncServerName, newServerName, VNCSERVERNAMELEN);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit ensures the buffer always has the null terminator.
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 |
4
++--
1 file changed,
2
insertions(+),
2
deletions(-)
vncviewer/vncviewer.cxx |
9
++
++++-
--
1 file changed,
6
insertions(+),
3
deletions(-)
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index d
2fe7e00..8ccfe563
100644
index d
7cbd6e36..4a8370b95
100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -4
02
,7 +4
02,7
@@
potentiallyLoadConfigurationFile(char *vncServerName)
@@ -4
11
,7 +4
11,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)
@@ -533,7 +533,7 @@
int main(int argc, char** argv)
@@ -541,8 +542,10 @@
int main(int argc, char** argv)
try {
const char* configServerName;
configServerName = loadViewerParameters(NULL);
if (configServerName != 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)
--
2.19.2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment