public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/pjproject/files/
@ 2021-03-26 18:32 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2021-03-26 18:32 UTC (permalink / raw
  To: gentoo-commits

commit:     af2f59d44940bf6003439830f1ee36f57a1d6363
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Mar 26 16:10:24 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 18:32:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af2f59d4

net-libs/pjproject: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/20129
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../pjproject/files/pjproject-2.7.2-libressl.patch |  98 --------------------
 .../files/pjproject-2.7.2-ssl-flipflop.patch       | 103 ---------------------
 2 files changed, 201 deletions(-)

diff --git a/net-libs/pjproject/files/pjproject-2.7.2-libressl.patch b/net-libs/pjproject/files/pjproject-2.7.2-libressl.patch
deleted file mode 100644
index 07efa9ccb8f..00000000000
--- a/net-libs/pjproject/files/pjproject-2.7.2-libressl.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Index: /third_party/srtp/crypto/hash/hmac_ossl.c
-===================================================================
---- /third_party/srtp/crypto/hash/hmac_ossl.c	(revision 5725)
-+++ /third_party/srtp/crypto/hash/hmac_ossl.c	(revision 5726)
-@@ -52,6 +52,8 @@
- #include <openssl/evp.h>
- #include <openssl/hmac.h>
-+#include <openssl/opensslv.h>
- 
- #define SHA1_DIGEST_SIZE		20
-+#define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER))
- 
- /* the debug module for authentiation */
-@@ -77,5 +79,5 @@
- /* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated
-    using HMAC_CTX_new.  But this function doesn't exist in OpenSSL 1.0.x. */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L
-     {
-         /* allocate memory for auth and HMAC_CTX structures */
-@@ -122,5 +124,5 @@
-     hmac_ctx = (HMAC_CTX*)a->state;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L
-     HMAC_CTX_cleanup(hmac_ctx);
- 
-Index: /pjlib/src/pj/ssl_sock_ossl.c
-===================================================================
---- /pjlib/src/pj/ssl_sock_ossl.c	(revision 5725)
-+++ /pjlib/src/pj/ssl_sock_ossl.c	(revision 5726)
-@@ -56,6 +56,10 @@
- #include <openssl/rand.h>
- #include <openssl/opensslconf.h>
--
--#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#include <openssl/opensslv.h>
-+
-+#define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER))
-+
-+#if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \
-+	&& OPENSSL_VERSION_NUMBER >= 0x1000200fL
- 
- #   include <openssl/obj_mac.h>
-@@ -115,5 +119,5 @@
- 
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x10100000L
- #  define OPENSSL_NO_SSL2	    /* seems to be removed in 1.1.0 */
- #  define M_ASN1_STRING_data(x)	    ASN1_STRING_get0_data(x)
-@@ -539,5 +543,5 @@
- 
-     /* Init OpenSSL lib */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L
-     SSL_library_init();
-     SSL_load_error_strings();
-@@ -560,5 +564,7 @@
- 	const char *cname;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\
-+    || OPENSSL_VERSION_NUMBER < 0x10100000L
-+
- 	meth = (SSL_METHOD*)SSLv23_server_method();
- 	if (!meth)
-@@ -603,5 +609,6 @@
- 	SSL_set_session(ssl, SSL_SESSION_new());
- 
--#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \
-+    && OPENSSL_VERSION_NUMBER >= 0x1000200fL
- 	openssl_curves_num = SSL_get_shared_curve(ssl,-1);
- 	if (openssl_curves_num > PJ_ARRAY_SIZE(openssl_curves))
-@@ -795,5 +802,6 @@
- 
-     /* Determine SSL method to use */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\
-+    || OPENSSL_VERSION_NUMBER < 0x10100000L
-     switch (ssock->param.proto) {
-     case PJ_SSL_SOCK_PROTO_TLS1:
-@@ -1232,5 +1240,6 @@
- static pj_status_t set_curves_list(pj_ssl_sock_t *ssock)
- {
--#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \
-+    && OPENSSL_VERSION_NUMBER >= 0x1000200fL
-     int ret;
-     int curves[PJ_SSL_SOCK_MAX_CURVES];
-@@ -1263,5 +1272,5 @@
- static pj_status_t set_sigalgs(pj_ssl_sock_t *ssock)
- {
--#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x1000200fL
-     int ret;
- 

diff --git a/net-libs/pjproject/files/pjproject-2.7.2-ssl-flipflop.patch b/net-libs/pjproject/files/pjproject-2.7.2-ssl-flipflop.patch
deleted file mode 100644
index c984bc62962..00000000000
--- a/net-libs/pjproject/files/pjproject-2.7.2-ssl-flipflop.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- pjproject-2.7.1.ORIG/aconfigure.ac	2018-02-06 11:34:20.973411193 +0000
-+++ pjproject-2.7.1/aconfigure.ac	2018-02-06 13:33:31.525015674 +0000
-@@ -1551,57 +1551,56 @@
-     enable_ssl=no
- fi
- 
--dnl # Include SSL support
-+dnl # Correct --enable vs --disable SSL flipflop logic
- AC_SUBST(ac_no_ssl)
- AC_SUBST(ac_ssl_has_aes_gcm,0)
- AC_ARG_ENABLE(ssl,
- 	      AS_HELP_STRING([--disable-ssl],
- 			     [Exclude SSL support the build (default: autodetect)])
--	      ,
--	      [
--		if test "$enable_ssl" = "no"; then
--		 [ac_no_ssl=1]
--		 AC_MSG_RESULT([Checking if SSL support is disabled... yes])
--	        fi
--	      ],
--	      [
--		AC_MSG_RESULT([checking for OpenSSL installations..])
--                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
--                    CFLAGS="$CFLAGS -I$with_ssl/include"
--                    LDFLAGS="$LDFLAGS -L$with_ssl/lib"
--                    AC_MSG_RESULT([Using SSL prefix... $with_ssl])
--                fi
--		AC_SUBST(openssl_h_present)
--		AC_SUBST(libssl_present)
--		AC_SUBST(libcrypto_present)
--		AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
--		AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
--		AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"])
--		if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
--	        	AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
--			
--			# Check if SRTP should be compiled with OpenSSL
--			# support, to enable cryptos such as AES GCM.
--			
--			# EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type.
--			# Update 2.7: our bundled libsrtp has been upgraded to 2.1.0,
--			# so we can omit EVP_CIPHER_CTX definition check now.
--			AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
--							  [EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm();])],
--					  [AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])])
--			if test "x$ac_ssl_has_aes_gcm" = "x1"; then
--				AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL])
--			else
--				AC_MSG_RESULT([OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos])
--			fi
--
--			# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
--			#AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
--			AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
-+)
-+
-+dnl # OpenSSL detection
-+AC_MSG_CHECKING([OpenSSL installations])
-+if test "x$enable_ssl" = "xno"; then
-+	ac_no_ssl=1
-+	AC_MSG_RESULT([explicitly disabled])
-+else
-+	if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
-+		CFLAGS="$CFLAGS -I$with_ssl/include"
-+		LDFLAGS="$LDFLAGS -L$with_ssl/lib"
-+		AC_MSG_RESULT([Using SSL prefix... $with_ssl])
-+	fi
-+	AC_SUBST(openssl_h_present)
-+	AC_SUBST(libssl_present)
-+	AC_SUBST(libcrypto_present)
-+	AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
-+	AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
-+	AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"])
-+	if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
-+	       	AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
-+
-+		# Check if SRTP should be compiled with OpenSSL
-+		# support, to enable cryptos such as AES GCM.
-+
-+		# EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type.
-+		# Update 2.7: our bundled libsrtp has been upgraded to 2.1.0,
-+		# so we can omit EVP_CIPHER_CTX definition check now.
-+		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
-+						  [EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm();])],
-+				  [AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])])
-+		if test "x$ac_ssl_has_aes_gcm" = "x1"; then
-+			AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL])
- 		else
--			AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **])
-+			AC_MSG_RESULT([OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos])
- 		fi
--	      ])
-+
-+		# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
-+		#AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
-+		AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
-+	else
-+		AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **])
-+	fi
-+fi
- 
- dnl # Obsolete option --with-opencore-amrnb
- AC_ARG_WITH(opencore-amrnb,


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/pjproject/files/
@ 2023-05-22 21:27 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2023-05-22 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     871c0d7f0cc4fca68f961233adca4e301ade6669
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri May 19 14:31:10 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon May 22 21:26:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=871c0d7f

net-libs/pjproject: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/31097
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/pjproject-2.12.1-CVE-2022-31031.patch    |  41 ---
 .../files/pjproject-2.12.1-r2-CVE-2022-39244.patch | 306 ---------------------
 .../files/pjproject-2.12.1-r2-CVE-2022-39269.patch |  33 ---
 .../files/pjproject-2.12.1-r2-bashism.patch        |  44 ---
 .../pjproject/files/pjproject-2.12.1-r2-musl.patch | 102 -------
 5 files changed, 526 deletions(-)

diff --git a/net-libs/pjproject/files/pjproject-2.12.1-CVE-2022-31031.patch b/net-libs/pjproject/files/pjproject-2.12.1-CVE-2022-31031.patch
deleted file mode 100644
index 637b7f374ffc..000000000000
--- a/net-libs/pjproject/files/pjproject-2.12.1-CVE-2022-31031.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 450baca94f475345542c6953832650c390889202 Mon Sep 17 00:00:00 2001
-From: sauwming <ming@teluu.com>
-Date: Tue, 7 Jun 2022 12:00:13 +0800
-Subject: [PATCH] Merge pull request from GHSA-26j7-ww69-c4qj
-
----
- pjlib-util/src/pjlib-util/stun_simple.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/pjlib-util/src/pjlib-util/stun_simple.c b/pjlib-util/src/pjlib-util/stun_simple.c
-index 722519584..d0549176d 100644
---- a/pjlib-util/src/pjlib-util/stun_simple.c
-+++ b/pjlib-util/src/pjlib-util/stun_simple.c
-@@ -54,6 +54,7 @@ PJ_DEF(pj_status_t) pjstun_parse_msg( void *buf, pj_size_t buf_len,
- {
-     pj_uint16_t msg_type, msg_len;
-     char *p_attr;
-+    int attr_max_cnt = PJ_ARRAY_SIZE(msg->attr);
- 
-     PJ_CHECK_STACK();
- 
-@@ -83,7 +84,7 @@ PJ_DEF(pj_status_t) pjstun_parse_msg( void *buf, pj_size_t buf_len,
-     msg->attr_count = 0;
-     p_attr = (char*)buf + sizeof(pjstun_msg_hdr);
- 
--    while (msg_len > 0) {
-+    while (msg_len > 0 && msg->attr_count < attr_max_cnt) {
- 	pjstun_attr_hdr **attr = &msg->attr[msg->attr_count];
- 	pj_uint32_t len;
- 	pj_uint16_t attr_type;
-@@ -111,6 +112,10 @@ PJ_DEF(pj_status_t) pjstun_parse_msg( void *buf, pj_size_t buf_len,
- 	p_attr += len;
- 	++msg->attr_count;
-     }
-+    if (msg->attr_count == attr_max_cnt) {
-+	PJ_LOG(4, (THIS_FILE, "Warning: max number attribute %d reached.",
-+		   attr_max_cnt));
-+    }
- 
-     return PJ_SUCCESS;
- }

diff --git a/net-libs/pjproject/files/pjproject-2.12.1-r2-CVE-2022-39244.patch b/net-libs/pjproject/files/pjproject-2.12.1-r2-CVE-2022-39244.patch
deleted file mode 100644
index a0995fb92957..000000000000
--- a/net-libs/pjproject/files/pjproject-2.12.1-r2-CVE-2022-39244.patch
+++ /dev/null
@@ -1,306 +0,0 @@
-https://bugs.gentoo.org/875863
-https://github.com/pjsip/pjproject/commit/c4d34984ec92b3d5252a7d5cddd85a1d3a8001ae
-
-From c4d34984ec92b3d5252a7d5cddd85a1d3a8001ae Mon Sep 17 00:00:00 2001
-From: sauwming <ming@teluu.com>
-Date: Mon, 3 Oct 2022 08:07:22 +0800
-Subject: [PATCH] Merge pull request from GHSA-fq45-m3f7-3mhj
-
-* Initial patch
-
-* Use 'pj_scan_is_eof(scanner)'
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Use 'pj_scan_is_eof(scanner)'
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Use 'pj_scan_is_eof(scanner)'
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Use `!pj_scan_is_eof` instead of manually checking `scanner->curptr < scanner->end`
-
-Co-authored-by: Maksim Mukosey <mmukosey@gmail.com>
-
-* Update pjlib-util/src/pjlib-util/scanner.c
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Update pjlib-util/src/pjlib-util/scanner.c
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Update pjlib-util/src/pjlib-util/scanner.c
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Revert '>=' back to '>' in pj_scan_stricmp_alnum()
-
-* Fix error compiles.
-
-Co-authored-by: Nanang Izzuddin <nanang@teluu.com>
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-Co-authored-by: Maksim Mukosey <mmukosey@gmail.com>
----
- pjlib-util/src/pjlib-util/scanner.c | 41 +++++++++++++++++++----------
- pjmedia/src/pjmedia/rtp.c           | 11 +++++---
- pjmedia/src/pjmedia/sdp.c           | 24 ++++++++++-------
- 3 files changed, 48 insertions(+), 28 deletions(-)
-
-diff --git a/pjlib-util/src/pjlib-util/scanner.c b/pjlib-util/src/pjlib-util/scanner.c
-index a54edf2d8e..6541bbae31 100644
---- a/pjlib-util/src/pjlib-util/scanner.c
-+++ b/pjlib-util/src/pjlib-util/scanner.c
-@@ -195,7 +195,13 @@ PJ_DEF(void) pj_scan_skip_whitespace( pj_scanner *scanner )
- 
- PJ_DEF(void) pj_scan_skip_line( pj_scanner *scanner )
- {
--    char *s = pj_memchr(scanner->curptr, '\n', scanner->end - scanner->curptr);
-+    char *s;
-+
-+    if (pj_scan_is_eof(scanner)) {
-+        return;
-+    }
-+
-+    s = pj_memchr(scanner->curptr, '\n', scanner->end - scanner->curptr);
-     if (!s) {
- 	scanner->curptr = scanner->end;
-     } else {
-@@ -264,8 +270,7 @@ PJ_DEF(void) pj_scan_get( pj_scanner *scanner,
- 
-     pj_assert(pj_cis_match(spec,0)==0);
- 
--    /* EOF is detected implicitly */
--    if (!pj_cis_match(spec, *s)) {
-+    if (pj_scan_is_eof(scanner) || !pj_cis_match(spec, *s)) {
- 	pj_scan_syntax_err(scanner);
- 	return;
-     }
-@@ -299,8 +304,7 @@ PJ_DEF(void) pj_scan_get_unescape( pj_scanner *scanner,
-     /* Must not match character '%' */
-     pj_assert(pj_cis_match(spec,'%')==0);
- 
--    /* EOF is detected implicitly */
--    if (!pj_cis_match(spec, *s) && *s != '%') {
-+    if (pj_scan_is_eof(scanner) || !pj_cis_match(spec, *s) && *s != '%') {
- 	pj_scan_syntax_err(scanner);
- 	return;
-     }
-@@ -436,7 +440,9 @@ PJ_DEF(void) pj_scan_get_n( pj_scanner *scanner,
-     
-     scanner->curptr += N;
- 
--    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
-+    if (!pj_scan_is_eof(scanner) &&
-+	PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws)
-+    {
- 	pj_scan_skip_whitespace(scanner);
-     }
- }
-@@ -467,15 +473,16 @@ PJ_DEF(int) pj_scan_get_char( pj_scanner *scanner )
- 
- PJ_DEF(void) pj_scan_get_newline( pj_scanner *scanner )
- {
--    if (!PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
-+    if (pj_scan_is_eof(scanner) || !PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
- 	pj_scan_syntax_err(scanner);
- 	return;
-     }
- 
-+    /* We have checked scanner->curptr validity above */
-     if (*scanner->curptr == '\r') {
- 	++scanner->curptr;
-     }
--    if (*scanner->curptr == '\n') {
-+    if (!pj_scan_is_eof(scanner) && *scanner->curptr == '\n') {
- 	++scanner->curptr;
-     }
- 
-@@ -520,7 +527,9 @@ PJ_DEF(void) pj_scan_get_until( pj_scanner *scanner,
- 
-     scanner->curptr = s;
- 
--    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
-+    if (!pj_scan_is_eof(scanner) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
-+	scanner->skip_ws)
-+    {
- 	pj_scan_skip_whitespace(scanner);
-     }
- }
-@@ -544,7 +553,9 @@ PJ_DEF(void) pj_scan_get_until_ch( pj_scanner *scanner,
- 
-     scanner->curptr = s;
- 
--    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
-+    if (!pj_scan_is_eof(scanner) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
-+	scanner->skip_ws)
-+    {
- 	pj_scan_skip_whitespace(scanner);
-     }
- }
-@@ -570,7 +581,9 @@ PJ_DEF(void) pj_scan_get_until_chr( pj_scanner *scanner,
- 
-     scanner->curptr = s;
- 
--    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
-+    if (!pj_scan_is_eof(scanner) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
-+	scanner->skip_ws)
-+    {
- 	pj_scan_skip_whitespace(scanner);
-     }
- }
-@@ -585,7 +598,9 @@ PJ_DEF(void) pj_scan_advance_n( pj_scanner *scanner,
- 
-     scanner->curptr += N;
- 
--    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && skip_ws) {
-+    if (!pj_scan_is_eof(scanner) && 
-+	PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && skip_ws)
-+    {
- 	pj_scan_skip_whitespace(scanner);
-     }
- }
-@@ -636,5 +651,3 @@ PJ_DEF(void) pj_scan_restore_state( pj_scanner *scanner,
-     scanner->line = state->line;
-     scanner->start_line = state->start_line;
- }
--
--
-diff --git a/pjmedia/src/pjmedia/rtp.c b/pjmedia/src/pjmedia/rtp.c
-index 18917f18b5..d29348cc5f 100644
---- a/pjmedia/src/pjmedia/rtp.c
-+++ b/pjmedia/src/pjmedia/rtp.c
-@@ -188,6 +188,11 @@ PJ_DEF(pj_status_t) pjmedia_rtp_decode_rtp2(
-     /* Payload is located right after header plus CSRC */
-     offset = sizeof(pjmedia_rtp_hdr) + ((*hdr)->cc * sizeof(pj_uint32_t));
- 
-+    /* Check that offset is less than packet size */
-+    if (offset >= pkt_len) {
-+        return PJMEDIA_RTP_EINLEN;
-+    }
-+
-     /* Decode RTP extension. */
-     if ((*hdr)->x) {
-         if (offset + sizeof (pjmedia_rtp_ext_hdr) > (unsigned)pkt_len)
-@@ -202,8 +207,8 @@ PJ_DEF(pj_status_t) pjmedia_rtp_decode_rtp2(
- 	dec_hdr->ext_len = 0;
-     }
- 
--    /* Check that offset is less than packet size */
--    if (offset > pkt_len)
-+    /* Check again that offset is still less than packet size */
-+    if (offset >= pkt_len)
- 	return PJMEDIA_RTP_EINLEN;
- 
-     /* Find and set payload. */
-@@ -393,5 +398,3 @@ void pjmedia_rtp_seq_update( pjmedia_rtp_seq_session *sess,
- 	seq_status->status.value = st.status.value;
-     }
- }
--
--
-diff --git a/pjmedia/src/pjmedia/sdp.c b/pjmedia/src/pjmedia/sdp.c
-index 3905c2f525..647f49e138 100644
---- a/pjmedia/src/pjmedia/sdp.c
-+++ b/pjmedia/src/pjmedia/sdp.c
-@@ -983,13 +983,13 @@ static void parse_version(pj_scanner *scanner,
-     ctx->last_error = PJMEDIA_SDP_EINVER;
- 
-     /* check equal sign */
--    if (*(scanner->curptr+1) != '=') {
-+    if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- 	on_scanner_error(scanner);
- 	return;
-     }
- 
-     /* check version is 0 */
--    if (*(scanner->curptr+2) != '0') {
-+    if (scanner->curptr+2 >= scanner->end || *(scanner->curptr+2) != '0') {
- 	on_scanner_error(scanner);
- 	return;
-     }
-@@ -1006,7 +1006,7 @@ static void parse_origin(pj_scanner *scanner, pjmedia_sdp_session *ses,
-     ctx->last_error = PJMEDIA_SDP_EINORIGIN;
- 
-     /* check equal sign */
--    if (*(scanner->curptr+1) != '=') {
-+    if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- 	on_scanner_error(scanner);
- 	return;
-     }
-@@ -1052,7 +1052,7 @@ static void parse_time(pj_scanner *scanner, pjmedia_sdp_session *ses,
-     ctx->last_error = PJMEDIA_SDP_EINTIME;
- 
-     /* check equal sign */
--    if (*(scanner->curptr+1) != '=') {
-+    if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- 	on_scanner_error(scanner);
- 	return;
-     }
-@@ -1080,7 +1080,7 @@ static void parse_generic_line(pj_scanner *scanner, pj_str_t *str,
-     ctx->last_error = PJMEDIA_SDP_EINSDP;
- 
-     /* check equal sign */
--    if (*(scanner->curptr+1) != '=') {
-+    if ((scanner->curptr+1 >= scanner->end) || *(scanner->curptr+1) != '=') {
- 	on_scanner_error(scanner);
- 	return;
-     }
-@@ -1149,7 +1149,7 @@ static void parse_media(pj_scanner *scanner, pjmedia_sdp_media *med,
-     ctx->last_error = PJMEDIA_SDP_EINMEDIA;
- 
-     /* check the equal sign */
--    if (*(scanner->curptr+1) != '=') {
-+    if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- 	on_scanner_error(scanner);
- 	return;
-     }
-@@ -1164,6 +1164,10 @@ static void parse_media(pj_scanner *scanner, pjmedia_sdp_media *med,
-     /* port */
-     pj_scan_get(scanner, &cs_token, &str);
-     med->desc.port = (unsigned short)pj_strtoul(&str);
-+    if (pj_scan_is_eof(scanner)) {
-+        on_scanner_error(scanner);
-+        return;
-+    }
-     if (*scanner->curptr == '/') {
- 	/* port count */
- 	pj_scan_get_char(scanner);
-@@ -1175,7 +1179,7 @@ static void parse_media(pj_scanner *scanner, pjmedia_sdp_media *med,
-     }
- 
-     if (pj_scan_get_char(scanner) != ' ') {
--	PJ_THROW(SYNTAX_ERROR);
-+	on_scanner_error(scanner);
-     }
- 
-     /* transport */
-@@ -1183,7 +1187,7 @@ static void parse_media(pj_scanner *scanner, pjmedia_sdp_media *med,
- 
-     /* format list */
-     med->desc.fmt_count = 0;
--    while (*scanner->curptr == ' ') {
-+    while (scanner->curptr < scanner->end && *scanner->curptr == ' ') {
- 	pj_str_t fmt;
- 
- 	pj_scan_get_char(scanner);
-@@ -1223,7 +1227,7 @@ static pjmedia_sdp_attr *parse_attr( pj_pool_t *pool, pj_scanner *scanner,
-     attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr);
- 
-     /* check equal sign */
--    if (*(scanner->curptr+1) != '=') {
-+    if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- 	on_scanner_error(scanner);
- 	return NULL;
-     }
-@@ -1242,7 +1246,7 @@ static pjmedia_sdp_attr *parse_attr( pj_pool_t *pool, pj_scanner *scanner,
- 	    pj_scan_get_char(scanner);
- 
- 	/* get value */
--	if (*scanner->curptr != '\r' && *scanner->curptr != '\n') {
-+	if (!pj_scan_is_eof(scanner) && *scanner->curptr != '\r' && *scanner->curptr != '\n') {
- 	    pj_scan_get_until_chr(scanner, "\r\n", &attr->value);
- 	} else {
- 	    attr->value.ptr = NULL;

diff --git a/net-libs/pjproject/files/pjproject-2.12.1-r2-CVE-2022-39269.patch b/net-libs/pjproject/files/pjproject-2.12.1-r2-CVE-2022-39269.patch
deleted file mode 100644
index 7c065a024b92..000000000000
--- a/net-libs/pjproject/files/pjproject-2.12.1-r2-CVE-2022-39269.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://bugs.gentoo.org/875863
-https://github.com/pjsip/pjproject/commit/d2acb9af4e27b5ba75d658690406cec9c274c5cc
-
-From d2acb9af4e27b5ba75d658690406cec9c274c5cc Mon Sep 17 00:00:00 2001
-From: Riza Sulistyo <trengginas@users.noreply.github.com>
-Date: Thu, 6 Oct 2022 13:55:13 +0700
-Subject: [PATCH] Merge pull request from GHSA-wx5m-cj97-4wwg
-
----
- pjmedia/src/pjmedia/transport_srtp.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/pjmedia/src/pjmedia/transport_srtp.c b/pjmedia/src/pjmedia/transport_srtp.c
-index 2d393beaa..39d06434b 100644
---- a/pjmedia/src/pjmedia/transport_srtp.c
-+++ b/pjmedia/src/pjmedia/transport_srtp.c
-@@ -1531,13 +1531,14 @@ static void srtp_rtp_cb(pjmedia_tp_cb_param *param)
- 	pjmedia_srtp_crypto tx, rx;
- 	pj_status_t status;
- 
-+	tx = srtp->tx_policy;
-+	rx = srtp->rx_policy;
-+
- 	/* Stop SRTP first, otherwise srtp_start() will maintain current
- 	 * roll-over counter.
- 	 */
- 	pjmedia_transport_srtp_stop((pjmedia_transport*)srtp);
- 
--	tx = srtp->tx_policy;
--	rx = srtp->rx_policy;
- 	status = pjmedia_transport_srtp_start((pjmedia_transport*)srtp,
- 					      &tx, &rx);
- 	if (status != PJ_SUCCESS) {

diff --git a/net-libs/pjproject/files/pjproject-2.12.1-r2-bashism.patch b/net-libs/pjproject/files/pjproject-2.12.1-r2-bashism.patch
deleted file mode 100644
index d24243eba223..000000000000
--- a/net-libs/pjproject/files/pjproject-2.12.1-r2-bashism.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://bugs.gentoo.org/865719
-https://github.com/pjsip/pjproject/pull/3220
-https://github.com/pjsip/pjproject/commit/bae7e5f4ff9047170e7e160ab52f6d9993aeae80
-
-From 84c7a5a6a050fcd51c7f5cada51df27ab00b7332 Mon Sep 17 00:00:00 2001
-From: Jaco Kroon <jaco@uls.co.za>
-Date: Fri, 19 Aug 2022 11:20:10 +0200
-Subject: [PATCH] aconfigure: fix bashism.
-
-${var//string/replacement} is considered a bashism and should be avoided
-in configure scripts.
-
-Signed-off-by: Jaco Kroon <jaco@uls.co.za>
----
- aconfigure    | 2 +-
- aconfigure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/aconfigure b/aconfigure
-index b15c133e2e..5ce01f5057 100755
---- a/aconfigure
-+++ b/aconfigure
-@@ -7986,7 +7986,7 @@ printf "%s\n" "not found" >&6; }
- 			ac_sdl_cflags=`$SDL_CONFIG --cflags`
- 			ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags"
- 			ac_sdl_ldflags=`$SDL_CONFIG --libs`
--			ac_sdl_ldflags=${ac_sdl_ldflags//-mwindows/}
-+			ac_sdl_ldflags=`echo "${ac_sdl_ldflags}" | sed -e 's/-mwindows//g'`
- 			LIBS="$LIBS $ac_sdl_ldflags"
- 		  else
- 			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Unsupported SDL version" >&5
-diff --git a/aconfigure.ac b/aconfigure.ac
-index 9fc32d0bf9..2b6227711e 100644
---- a/aconfigure.ac
-+++ b/aconfigure.ac
-@@ -1295,7 +1295,7 @@ AC_ARG_ENABLE(sdl,
- 			ac_sdl_cflags=`$SDL_CONFIG --cflags`
- 			ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags"
- 			ac_sdl_ldflags=`$SDL_CONFIG --libs`
--			ac_sdl_ldflags=${ac_sdl_ldflags//-mwindows/}
-+			ac_sdl_ldflags=`echo "${ac_sdl_ldflags}" | sed -e 's/-mwindows//g'`
- 			LIBS="$LIBS $ac_sdl_ldflags"
- 		  else
- 			AC_MSG_RESULT([Unsupported SDL version])

diff --git a/net-libs/pjproject/files/pjproject-2.12.1-r2-musl.patch b/net-libs/pjproject/files/pjproject-2.12.1-r2-musl.patch
deleted file mode 100644
index 8db401dc7544..000000000000
--- a/net-libs/pjproject/files/pjproject-2.12.1-r2-musl.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From aa54bd7ae0d60461cb5f434da1338faf315314f6 Mon Sep 17 00:00:00 2001
-From: orbea <orbea@riseup.net>
-Date: Sun, 9 Oct 2022 23:17:34 -0700
-Subject: [PATCH] Fix the build with musl
-
-The execinfo.h header is GNU specific and is not available with musl.
-
-This commit is based on a patch from Alpine Linux.
-
-https://git.alpinelinux.org/aports/tree/main/pjproject/execinfo.patch?h=3.16-stable
-
-Gentoo Issue: https://bugs.gentoo.org/867343
----
- pjlib-util/src/pjlib-util-test/main.c | 2 +-
- pjlib/src/pjlib-test/main.c           | 2 +-
- pjmedia/src/test/main.c               | 2 +-
- pjnath/src/pjnath-test/main.c         | 2 +-
- pjsip-apps/src/pjsua/main.c           | 2 +-
- pjsip/src/test/main.c                 | 2 +-
- 6 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/pjlib-util/src/pjlib-util-test/main.c b/pjlib-util/src/pjlib-util-test/main.c
-index 4aeb3e07d..780db4d33 100644
---- a/pjlib-util/src/pjlib-util-test/main.c
-+++ b/pjlib-util/src/pjlib-util-test/main.c
-@@ -33,7 +33,7 @@ static void init_signals()
-     sigaction(SIGALRM, &act, NULL);
- }
- 
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif __GLIBC__ || PJ_DARWINOS
- 
- #include <execinfo.h>
- #include <signal.h>
-diff --git a/pjlib/src/pjlib-test/main.c b/pjlib/src/pjlib-test/main.c
-index d5f853a60..76a077037 100644
---- a/pjlib/src/pjlib-test/main.c
-+++ b/pjlib/src/pjlib-test/main.c
-@@ -54,7 +54,7 @@ static void init_signals()
-     sigaction(SIGALRM, &act, NULL);
- }
- 
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif __GLIBC__ || PJ_DARWINOS
- 
- #include <execinfo.h>
- #include <signal.h>
-diff --git a/pjmedia/src/test/main.c b/pjmedia/src/test/main.c
-index 8d6353b15..b16023761 100644
---- a/pjmedia/src/test/main.c
-+++ b/pjmedia/src/test/main.c
-@@ -32,7 +32,7 @@
- #endif
- 
- 
--#if PJ_LINUX || PJ_DARWINOS
-+#if __GLIBC__ || PJ_DARWINOS
- 
- #include <execinfo.h>
- #include <signal.h>
-diff --git a/pjnath/src/pjnath-test/main.c b/pjnath/src/pjnath-test/main.c
-index d783669e5..f6c906166 100644
---- a/pjnath/src/pjnath-test/main.c
-+++ b/pjnath/src/pjnath-test/main.c
-@@ -32,7 +32,7 @@ static void init_signals()
-     sigaction(SIGALRM, &act, NULL);
- }
- 
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif __GLIBC__ || PJ_DARWINOS
- 
- #include <execinfo.h>
- #include <signal.h>
-diff --git a/pjsip-apps/src/pjsua/main.c b/pjsip-apps/src/pjsua/main.c
-index bb8ddc345..fcc1e8f34 100644
---- a/pjsip-apps/src/pjsua/main.c
-+++ b/pjsip-apps/src/pjsua/main.c
-@@ -80,7 +80,7 @@ static void setup_signal_handler(void)
-     SetConsoleCtrlHandler(&CtrlHandler, TRUE);
- }
- 
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif __GLIBC__ || PJ_DARWINOS
- 
- #include <execinfo.h>
- #include <signal.h>
-diff --git a/pjsip/src/test/main.c b/pjsip/src/test/main.c
-index 18e4c9255..255667dda 100644
---- a/pjsip/src/test/main.c
-+++ b/pjsip/src/test/main.c
-@@ -36,7 +36,7 @@ static void usage(void)
-     list_tests();
- }
- 
--#if PJ_LINUX || PJ_DARWINOS
-+#if __GLIBC__ || PJ_DARWINOS
- 
- #include <execinfo.h>
- #include <signal.h>
--- 
-2.35.1
-


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-22 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 21:27 [gentoo-commits] repo/gentoo:master commit in: net-libs/pjproject/files/ Conrad Kostecki
  -- strict thread matches above, loose matches on Subject: below --
2021-03-26 18:32 Conrad Kostecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox