Compare commits
No commits in common. "c8" and "c8-beta" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/nspr-4.36.tar.gz
|
||||
SOURCES/nspr-4.34.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
3c4bdb5ea668cfd005ba8f6116fb1275524a65b6 SOURCES/nspr-4.36.tar.gz
|
||||
efea1385dc83c55018183257036206b5f2c77c59 SOURCES/nspr-4.34.tar.gz
|
||||
|
51
SOURCES/nspr-4.34-fix-coverity-loop-issue.patch
Normal file
51
SOURCES/nspr-4.34-fix-coverity-loop-issue.patch
Normal file
@ -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;
|
||||
}
|
12
SOURCES/nspr-4.34-server-passive.patch
Normal file
12
SOURCES/nspr-4.34-server-passive.patch
Normal file
@ -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;
|
||||
|
@ -1,53 +0,0 @@
|
||||
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
|
||||
@@ -2047,35 +2047,43 @@ PR_GetPrefLoopbackAddrInfo(PRNetAddr* re
|
||||
return PR_FAILURE;
|
||||
#else
|
||||
|
||||
PRADDRINFO *res, hints;
|
||||
PRStatus rv;
|
||||
|
||||
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;
|
||||
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))
|
||||
+ if (ai->ai_addrlen < sizeof(PRNetAddr))
|
||||
memset(((char*)result) + 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;
|
@ -1,7 +1,12 @@
|
||||
diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
||||
--- ./pr/include/md/_linux.h.gcc-atomics 2022-09-20 11:23:22.008942926 -0700
|
||||
+++ ./pr/include/md/_linux.h 2022-09-20 11:34:45.536751340 -0700
|
||||
@@ -105,6 +105,15 @@
|
||||
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
|
||||
--- a/pr/include/md/_linux.h
|
||||
+++ b/pr/include/md/_linux.h
|
||||
@@ -82,53 +82,73 @@
|
||||
#define NO_DLOPEN_NULL
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD_kernel__) || defined(__GNU__)
|
||||
#define _PR_HAVE_SOCKADDR_LEN
|
||||
#endif
|
||||
|
||||
#if defined(__i386__)
|
||||
@ -17,7 +22,11 @@ diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
#define _MD_INIT_ATOMIC()
|
||||
extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val);
|
||||
@@ -116,6 +125,7 @@ extern PRInt32 _PR_x86_AtomicAdd(PRInt32
|
||||
#define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement
|
||||
extern PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement
|
||||
extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||
#define _MD_ATOMIC_ADD _PR_x86_AtomicAdd
|
||||
extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_x86_AtomicSet
|
||||
#endif
|
||||
@ -25,7 +34,15 @@ diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
||||
|
||||
#if defined(__ia64__)
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
@@ -131,6 +141,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt3
|
||||
#define _MD_INIT_ATOMIC()
|
||||
extern PRInt32 _PR_ia64_AtomicIncrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_INCREMENT _PR_ia64_AtomicIncrement
|
||||
extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_DECREMENT _PR_ia64_AtomicDecrement
|
||||
extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||
#define _MD_ATOMIC_ADD _PR_ia64_AtomicAdd
|
||||
extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_ia64_AtomicSet
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
@ -41,11 +58,20 @@ diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
#define _MD_INIT_ATOMIC()
|
||||
extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val);
|
||||
@@ -142,6 +161,7 @@ extern PRInt32 _PR_x86_64_AtomicAdd(PRIn
|
||||
#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement
|
||||
extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement
|
||||
extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||
#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd
|
||||
extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(__loongarch__)
|
||||
#if defined(__or1k__)
|
||||
#if defined(__GNUC__)
|
||||
/* Use GCC built-in functions */
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
#define _MD_INIT_ATOMIC()
|
||||
#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
|
||||
#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
%global nspr_version 4.36.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: 2%{?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,7 +27,8 @@ Source1: nspr-config.xml
|
||||
Patch1: nspr-config-pc.patch
|
||||
Patch2: nspr-gcc-atomics.patch
|
||||
|
||||
Patch10: nspr-4.36-fix-coverity-loop-issue.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
|
||||
@ -62,6 +63,7 @@ cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in
|
||||
pushd nspr
|
||||
%patch2 -p1 -b .gcc-atomics
|
||||
%patch10 -p1 -b .coverity
|
||||
%patch11 -p1 -b .passive
|
||||
popd
|
||||
|
||||
%build
|
||||
@ -155,15 +157,6 @@ done
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 18 2025 Bob Relyea <rrelyea@redhat.com> - 4.36.0-2
|
||||
- Bump version number to clear infrastructure issues
|
||||
|
||||
* Wed Jul 16 2025 Bob Relyea <rrelyea@redhat.com> - 4.36.0-1
|
||||
- Update to NSPR 4.36
|
||||
|
||||
* Wed Jun 14 2023 Bob Relyea <rrelyea@redhat.com> - 4.35.0-1
|
||||
- Update to NSPR 4.35
|
||||
|
||||
* Wed Jun 15 2022 Bob Relyea <rrelyea@redhat.com> - 4.34.0-3
|
||||
- Coverity fix changed selfserv from passive to active, change it back
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user