git: 8c3cc66ae442 - main - net/freerdp3: update to 3.5.0 with 6 CVEs fixed

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Thu, 18 Apr 2024 20:42:59 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8c3cc66ae44252df585713b085edda4c4f04c457

commit 8c3cc66ae44252df585713b085edda4c4f04c457
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-04-18 20:31:11 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-04-18 20:31:11 +0000

    net/freerdp3: update to 3.5.0 with 6 CVEs fixed
    
    Changelog:
    https://github.com/FreeRDP/FreeRDP/releases/tag/3.5.0
    
    CVE:
    CVE-2024-32041 [Low] OutOfBound Read in zgfx_decompress_segment
    CVE-2024-32039 [Moderate] Integer overflow & OutOfBound Write in clear_decompress_residual_data
    CVE-2024-32040 [Low] integer underflow in nsc_rle_decode
    CVE-2024-32458 [Low] OutOfBound Read in planar_skip_plane_rle
    CVE-2024-32459 [Low] OutOfBound Read in ncrush_decompress
    CVE-2024-32460 [Low] OutOfBound Read in interleaved_decompress
    
    Approved by:    arrowd (mentor, implicit)
    MFH:            2024Q2
---
 net/freerdp3/Makefile                              | 10 +++++---
 net/freerdp3/distinfo                              |  8 +++---
 .../files/patch-winpr_libwinpr_sysinfo_sysinfo.c   | 29 ----------------------
 3 files changed, 11 insertions(+), 36 deletions(-)

diff --git a/net/freerdp3/Makefile b/net/freerdp3/Makefile
index 4bd93dfd4915..14f52657f26d 100644
--- a/net/freerdp3/Makefile
+++ b/net/freerdp3/Makefile
@@ -1,11 +1,14 @@
 PORTNAME=	freerdp
-DISTVERSION=	3.4.0
-PORTREVISION=	1
+DISTVERSION=	3.5.0
 CATEGORIES=	net comms
 MASTER_SITES=	https://pub.freerdp.com/releases/ \
 		https://github.com/FreeRDP/FreeRDP/releases/download/${DISTVERSION}/
 PKGNAMESUFFIX=	3
 
+PATCH_SITES=	https://github.com/FreeRDP/FreeRDP/commit/
+# move epoll detection to platform: https://github.com/FreeRDP/FreeRDP/pull/10097
+PATCHFILES+=	be19268d5d186118a751d275602be2fb5ffcc3d8.patch:-p1
+
 MAINTAINER=	vvd@FreeBSD.org
 COMMENT=	Free implementation of Remote Desktop Protocol
 WWW=		https://www.freerdp.com/
@@ -176,8 +179,7 @@ WAYLAND_CMAKE_BOOL=	WITH_WAYLAND
 WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
 WEBP_CMAKE_BOOL=	WINPR_UTILS_IMAGE_WEBP
 
-X11_USES=		xorg
-X11_USE=		xorg=x11,xcursor,xext,xorgproto,xfixes,xi,xinerama,xkbfile,xrandr,xrender,xv
+X11_USE=		xorg=xcursor,xfixes,xi,xinerama,xkbfile,xorgproto,xrandr,xrender,xv
 X11_CMAKE_ON=		-DWITH_X11:BOOL=ON -DWITH_XCURSOR:BOOL=ON \
 			-DWITH_XEXT:BOOL=ON -DWITH_XFIXES:BOOL=ON \
 			-DWITH_XI:BOOL=ON -DWITH_XINERAMA:BOOL=ON \
diff --git a/net/freerdp3/distinfo b/net/freerdp3/distinfo
index b46f48bda6da..9ffa6383688e 100644
--- a/net/freerdp3/distinfo
+++ b/net/freerdp3/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1710490177
-SHA256 (freerdp-3.4.0.tar.gz) = e44fec047d69c728178a21cdc3d5a55d1dac57e4c104e7318d27cba247232133
-SIZE (freerdp-3.4.0.tar.gz) = 9331562
+TIMESTAMP = 1713470999
+SHA256 (freerdp-3.5.0.tar.gz) = 13c37e875c1f26f78526e58aa63303b04221e393fde61e6106ce72402a63b529
+SIZE (freerdp-3.5.0.tar.gz) = 9335565
+SHA256 (be19268d5d186118a751d275602be2fb5ffcc3d8.patch) = 6d27ff2cc60994794142c0fcabb7988dbacf105636cae66f47e98b7e477c9def
+SIZE (be19268d5d186118a751d275602be2fb5ffcc3d8.patch) = 1553
diff --git a/net/freerdp3/files/patch-winpr_libwinpr_sysinfo_sysinfo.c b/net/freerdp3/files/patch-winpr_libwinpr_sysinfo_sysinfo.c
deleted file mode 100644
index 23b92abce568..000000000000
--- a/net/freerdp3/files/patch-winpr_libwinpr_sysinfo_sysinfo.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- winpr/libwinpr/sysinfo/sysinfo.c.orig	2024-03-14 10:28:33 UTC
-+++ winpr/libwinpr/sysinfo/sysinfo.c
-@@ -34,7 +34,7 @@
- #endif
- 
- #if !defined(_WIN32)
--#if defined(_POSIX_SOURCE) && (_POSIX_C_SOURCE >= 200112L)
-+#if (_POSIX_C_SOURCE >= 200112L) || defined(__FreeBSD__)
- #include <time.h>
- #elif !defined(__APPLE__)
- #include <sys/time.h>
-@@ -579,7 +579,7 @@ ULONGLONG winpr_GetTickCount64(void)
- UINT64 winpr_GetTickCount64NS(void)
- {
- 	UINT64 ticks = 0;
--#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)
-+#if (_POSIX_C_SOURCE >= 200112L) || defined(__FreeBSD__)
- 	struct timespec ts = { 0 };
- 
- 	if (clock_gettime(CLOCK_MONOTONIC_RAW, &ts) == 0)
-@@ -632,7 +632,7 @@ UINT64 winpr_GetUnixTimeNS(void)
- 	} t = { 0 };
- 	GetSystemTimeAsFileTime(&t.ft);
- 	return (t.u64 - FILETIME_TO_UNIX_OFFSET_S * 10000000ull) * 100ull;
--#elif _POSIX_C_SOURCE >= 200112L
-+#elif (_POSIX_C_SOURCE >= 200112L) || defined(__FreeBSD__)
- 	struct timespec ts = { 0 };
- 	if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
- 		return 0;