On 5/10/23 5:06 AM, Jack Mitchell wrote:
Upstream-Status: Backport
Link:
https://github.com/nss-dev/nss/commit/cbf5a2bce75ca2c2fd3e247796b9892f5298584e
Signed-off-by: Jack Mitchell <m...@embed.me.uk>
What is the difference between the patch #1 and #2, they look the same
to me.
---
...ecperf-fix-dangling-pointer-warning-.patch | 75 +++++++++++++++++++
meta-oe/recipes-support/nss/nss_3.51.1.bb | 1 +
2 files changed, 76 insertions(+)
create mode 100644
meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch
diff --git
a/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch
b/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch
new file mode 100644
index 000000000..dc7e172aa
--- /dev/null
+++
b/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch
@@ -0,0 +1,75 @@
+From cbf5a2bce75ca2c2fd3e247796b9892f5298584e Mon Sep 17 00:00:00 2001
+From: "John M. Schanck" <jscha...@mozilla.com>
+Date: Thu, 13 Apr 2023 17:43:46 +0000
+Subject: [PATCH] Bug 1826650 - cmd/ecperf: fix dangling pointer warning on gcc
+ 13. r=djackson
+
+Differential Revision: https://phabricator.services.mozilla.com/D174822
This patch should contain:
Upstream-Status: Backport
Link:
https://github.com/nss-dev/nss/commit/cbf5a2bce75ca2c2fd3e247796b9892f5298584e
and your sign-off-by.
+
+--HG--
+extra : moz-landing-system : lando
+---
+ cmd/ecperf/ecperf.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c
+index 705d68f35..a07004d8e 100644
+--- a/cmd/ecperf/ecperf.c
++++ b/cmd/ecperf/ecperf.c
+@@ -53,6 +53,7 @@ PKCS11Thread(void *data)
+ SECItem sig;
+ CK_SESSION_HANDLE session;
+ CK_RV crv;
++ void *tmp = NULL;
+
+ threadData->status = SECSuccess;
+ threadData->count = 0;
+@@ -68,6 +69,7 @@ PKCS11Thread(void *data)
+ if (threadData->isSign) {
+ sig.data = sigData;
+ sig.len = sizeof(sigData);
++ tmp = threadData->p2;
+ threadData->p2 = (void *)&sig;
+ }
+
+@@ -79,6 +81,10 @@ PKCS11Thread(void *data)
+ }
+ threadData->count++;
+ }
++
++ if (threadData->isSign) {
++ threadData->p2 = tmp;
++ }
+ return;
+ }
+
+@@ -89,6 +95,7 @@ genericThread(void *data)
+ int iters = threadData->iters;
+ unsigned char sigData[256];
+ SECItem sig;
++ void *tmp = NULL;
+
+ threadData->status = SECSuccess;
+ threadData->count = 0;
+@@ -96,6 +103,7 @@ genericThread(void *data)
+ if (threadData->isSign) {
+ sig.data = sigData;
+ sig.len = sizeof(sigData);
++ tmp = threadData->p2;
+ threadData->p2 = (void *)&sig;
+ }
+
+@@ -107,6 +115,10 @@ genericThread(void *data)
+ }
+ threadData->count++;
+ }
++
++ if (threadData->isSign) {
++ threadData->p2 = tmp;
++ }
+ return;
+ }
+
+--
+2.40.1
+
diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb
b/meta-oe/recipes-support/nss/nss_3.51.1.bb
index 721b38ddb..af842ee67 100644
--- a/meta-oe/recipes-support/nss/nss_3.51.1.bb
+++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb
@@ -44,6 +44,7 @@ SRC_URI =
"http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
file://CVE-2022-22747.patch \
file://CVE-2023-0767.patch \
file://0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch;patchdir=nss
\
+
file://0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch;patchdir=nss
\
"
SRC_URI[md5sum] = "6acaf1ddff69306ae30a908881c6f233"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#102551):
https://lists.openembedded.org/g/openembedded-devel/message/102551
Mute This Topic: https://lists.openembedded.org/mt/98802000/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-