import UBI nspr-4.36.0-2.el8_10
This commit is contained in:
parent
d4e60c6361
commit
2d04eab2f9
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/nspr-4.35.tar.gz
|
||||
SOURCES/nspr-4.36.tar.gz
|
||||
|
||||
@ -1 +1 @@
|
||||
71267859a581d61fea8d7d36c25f716750271cac SOURCES/nspr-4.35.tar.gz
|
||||
3c4bdb5ea668cfd005ba8f6116fb1275524a65b6 SOURCES/nspr-4.36.tar.gz
|
||||
|
||||
@ -1,51 +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
|
||||
@@ -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;
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
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;
|
||||
|
||||
53
SOURCES/nspr-4.36-fix-coverity-loop-issue.patch
Normal file
53
SOURCES/nspr-4.36-fix-coverity-loop-issue.patch
Normal file
@ -0,0 +1,53 @@
|
||||
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,4 +1,4 @@
|
||||
%global nspr_version 4.35.0
|
||||
%global nspr_version 4.36.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: 2%{?dist}
|
||||
License: MPLv2.0
|
||||
URL: http://ftp.mozilla.org/pub/nspr/releases/v${nspr_archive_version}/src
|
||||
Group: System Environment/Libraries
|
||||
@ -27,8 +27,7 @@ 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
|
||||
Patch10: nspr-4.36-fix-coverity-loop-issue.patch
|
||||
|
||||
%description
|
||||
NSPR provides platform independence for non-GUI operating system
|
||||
@ -63,7 +62,6 @@ 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
|
||||
@ -157,8 +155,14 @@ done
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Wed Jun 14 2023 Bob Relyea <rrelyea@redhat.com> - 4.34.0-1
|
||||
- Upste to NSPR 4.35
|
||||
* 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