buildroot/package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-curre.patch
Thomas Devoogdt e5bb457d5d package/x11vnc: add and rework compile patches
Add the "Upstream" field to the patch message for:
 - 0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
 - 0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch

Add a compile patch for GCC >= 10 which enables -fno-common by default.

Fixes:
 - https://autobuild.buildroot.org/results/b2231fe06fe56036a5ddbe61cb8556b046e3a7b7
 - https://autobuild.buildroot.org/results/8afbcc63818d3e1586731e178f16635e773d5600
 - ...

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
[Julien: simplified autobuild URLs]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2024-11-08 22:18:45 +01:00

28 lines
926 B
Diff

From 3870280eca9c10a3607440209e9caf6d7749e379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr>
Date: Wed, 18 Nov 2020 08:40:45 +0100
Subject: [PATCH] scan: limit access to shared memory segments to current user
Upstream: https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
src/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scan.c b/src/scan.c
index 43e00d2..12994d5 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h,
#if HAVE_XSHM
shm->shmid = shmget(IPC_PRIVATE,
- xim->bytes_per_line * xim->height, IPC_CREAT | 0777);
+ xim->bytes_per_line * xim->height, IPC_CREAT | 0600);
if (shm->shmid == -1) {
rfbErr("shmget(%s) failed.\n", name);
--
2.43.0