git: 1b19391b2c14 - 2024Q4 - net/x11vnc: patch CVE-2020-29074

From: Dirk Meyer <dinoex_at_FreeBSD.org>
Date: Fri, 08 Nov 2024 17:52:19 UTC
The branch 2024Q4 has been updated by dinoex:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1b19391b2c147986b510fb883671b44f1ddd98e2

commit 1b19391b2c147986b510fb883671b44f1ddd98e2
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-11-08 17:48:33 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-11-08 17:52:12 +0000

    net/x11vnc: patch CVE-2020-29074
    
    Security: CVE-2020-29074
    MFC: 2024Q4
    (cherry picked from commit 78dcb38f4af7e4b50df83976aefb81596eaafc80)
---
 net/x11vnc/Makefile               |  2 +-
 net/x11vnc/files/patch-src_scan.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/net/x11vnc/Makefile b/net/x11vnc/Makefile
index 1067d3b9349d..92606363ca6c 100644
--- a/net/x11vnc/Makefile
+++ b/net/x11vnc/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	x11vnc
 PORTVERSION=	0.9.16
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	net
 
 MAINTAINER=	dinoex@FreeBSD.org
diff --git a/net/x11vnc/files/patch-src_scan.c b/net/x11vnc/files/patch-src_scan.c
new file mode 100644
index 000000000000..8c711d1c2c2c
--- /dev/null
+++ b/net/x11vnc/files/patch-src_scan.c
@@ -0,0 +1,11 @@
+--- src/scan.c.orig	2019-01-05 13:22:11 UTC
++++ src/scan.c
+@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **x
+ 
+ #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);