From c6aa5d0c57228760034c46b00a09e632c87c9e29 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 13 2022 07:38:43 +0000 Subject: import nspr-4.34.0-3.el8_6 --- diff --git a/.gitignore b/.gitignore index fd24cc6..c3963b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/nspr-4.32.tar.gz +SOURCES/nspr-4.34.tar.gz diff --git a/.nspr.metadata b/.nspr.metadata index f10a911..3d1d43d 100644 --- a/.nspr.metadata +++ b/.nspr.metadata @@ -1 +1 @@ -28e05ef5cbe6e7cde239d3cdcccabf571ec73f69 SOURCES/nspr-4.32.tar.gz +efea1385dc83c55018183257036206b5f2c77c59 SOURCES/nspr-4.34.tar.gz diff --git a/SOURCES/nspr-4.34-fix-coverity-loop-issue.patch b/SOURCES/nspr-4.34-fix-coverity-loop-issue.patch new file mode 100644 index 0000000..c8c4149 --- /dev/null +++ b/SOURCES/nspr-4.34-fix-coverity-loop-issue.patch @@ -0,0 +1,51 @@ +diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c +--- a/pr/src/misc/prnetdb.c ++++ b/pr/src/misc/prnetdb.c +@@ -2209,28 +2209,38 @@ PR_GetPrefLoopbackAddrInfo(PRNetAddr *re + PRBool result_still_empty = PR_TRUE; + PRADDRINFO *ai = res; + do { + PRNetAddr aNetAddr; + + while (ai && ai->ai_addrlen > sizeof(PRNetAddr)) + ai = ai->ai_next; + +- if (ai) { +- /* copy sockaddr to PRNetAddr */ +- memcpy(&aNetAddr, ai->ai_addr, ai->ai_addrlen); +- aNetAddr.raw.family = ai->ai_addr->sa_family; ++ if (!ai) { ++ break; ++ } ++ ++ /* copy sockaddr to PRNetAddr */ ++ memcpy(&aNetAddr, ai->ai_addr, ai->ai_addrlen); ++ aNetAddr.raw.family = ai->ai_addr->sa_family; + #ifdef _PR_INET6 +- if (AF_INET6 == aNetAddr.raw.family) +- aNetAddr.raw.family = PR_AF_INET6; ++ if (AF_INET6 == aNetAddr.raw.family) ++ aNetAddr.raw.family = PR_AF_INET6; + #endif +- if (ai->ai_addrlen < sizeof(PRNetAddr)) +- memset(((char*)result)+ai->ai_addrlen, 0, +- sizeof(PRNetAddr) - ai->ai_addrlen); ++ if (ai->ai_addrlen < sizeof(PRNetAddr)) ++ memset(((char*)&aNetAddr)+ai->ai_addrlen, 0, ++ sizeof(PRNetAddr) - ai->ai_addrlen); ++ ++ if (result->raw.family == PR_AF_INET) { ++ aNetAddr.inet.port = htons(port); + } ++ else { ++ aNetAddr.ipv6.port = htons(port); ++ } ++ + + /* If we obtain more than one result, prefer IPv6. */ + if (result_still_empty || aNetAddr.raw.family == PR_AF_INET6) { + memcpy(result, &aNetAddr, sizeof(PRNetAddr)); + } + result_still_empty = PR_FALSE; + ai = ai->ai_next; + } diff --git a/SOURCES/nspr-4.34-server-passive.patch b/SOURCES/nspr-4.34-server-passive.patch new file mode 100644 index 0000000..ed8d713 --- /dev/null +++ b/SOURCES/nspr-4.34-server-passive.patch @@ -0,0 +1,12 @@ +diff -r c75b4e36b7e8 pr/src/misc/prnetdb.c +--- a/pr/src/misc/prnetdb.c Wed May 25 23:39:48 2022 +0200 ++++ b/pr/src/misc/prnetdb.c Tue Jun 14 18:48:03 2022 -0400 +@@ -2204,6 +2204,7 @@ + + memset(&hints, 0, sizeof(hints)); + ++ hints.ai_flags = AI_PASSIVE; + rv = GETADDRINFO(NULL, tmpBuf, &hints, &res); + if (rv == 0) { + PRBool result_still_empty = PR_TRUE; + diff --git a/SPECS/nspr.spec b/SPECS/nspr.spec index f3e731e..caf5eb9 100644 --- a/SPECS/nspr.spec +++ b/SPECS/nspr.spec @@ -1,4 +1,4 @@ -%global nspr_version 4.32.0 +%global nspr_version 4.34.0 # The upstream omits the trailing ".0", while we need it for # consistency with the pkg-config version: @@ -11,7 +11,7 @@ rpm.define(string.format("nspr_archive_version %s", Summary: Netscape Portable Runtime Name: nspr Version: %{nspr_version} -Release: 1%{?dist} +Release: 3%{?dist} License: MPLv2.0 URL: http://ftp.mozilla.org/pub/nspr/releases/v${nspr_archive_version}/src Group: System Environment/Libraries @@ -27,6 +27,9 @@ Source1: nspr-config.xml Patch1: nspr-config-pc.patch Patch2: nspr-gcc-atomics.patch +Patch10: nspr-4.34-fix-coverity-loop-issue.patch +Patch11: nspr-4.34-server-passive.patch + %description NSPR provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, @@ -59,6 +62,8 @@ cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in %patch1 -p0 -b .flags pushd nspr %patch2 -p1 -b .gcc-atomics +%patch10 -p1 -b .coverity +%patch11 -p1 -b .passive popd %build @@ -152,6 +157,15 @@ done %{_mandir}/man*/* %changelog +* Wed Jun 15 2022 Bob Relyea - 4.34.0-3 +- Coverity fix changed selfserv from passive to active, change it back + +* Mon Jun 6 2022 Bob Relyea - 4.34.0-2 +- Fix coverify issue in NSPR 4.34 + +* Thu Jun 2 2022 Bob Relyea - 4.34.0-1 +- Update to NSPR 4.34 + * Thu Jun 17 2021 Bob Relyea - 4.32.0-1 - Update to NSPR 4.32