fix core dump when sigd-signerInfos is NULL
This commit is contained in:
parent
83cdbe0d37
commit
f1ea8ad7c0
26
fix-core-dump-when-sigd-signerInfos-is-NULL.patch
Normal file
26
fix-core-dump-when-sigd-signerInfos-is-NULL.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 0641f1a9351fdb06d7e5d19a48ad7fe6175713e7 Mon Sep 17 00:00:00 2001
|
||||
From: guoxiaoqi <guoxiaoqi2@huawei.com>
|
||||
Date: Thu, 30 Apr 2020 09:40:20 +0800
|
||||
Subject: [PATCH] fix core dump when sigd->signerInfos is NULL
|
||||
|
||||
Signed-off-by: guoxiaoqi <guoxiaoqi2@huawei.com>
|
||||
---
|
||||
nss/lib/smime/cmssigdata.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/nss/lib/smime/cmssigdata.c b/nss/lib/smime/cmssigdata.c
|
||||
index 7dd6ea4..32a8166 100644
|
||||
--- a/nss/lib/smime/cmssigdata.c
|
||||
+++ b/nss/lib/smime/cmssigdata.c
|
||||
@@ -476,7 +476,7 @@ NSS_CMSSignedData_SignerInfoCount(NSSCMSSignedData *sigd)
|
||||
NSSCMSSignerInfo *
|
||||
NSS_CMSSignedData_GetSignerInfo(NSSCMSSignedData *sigd, int i)
|
||||
{
|
||||
- if (!sigd) {
|
||||
+ if (!sigd || !sigd->signerInfos) {
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
return NULL;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
8
nss.spec
8
nss.spec
@ -12,7 +12,7 @@
|
||||
Summary: Network Security Services
|
||||
Name: nss
|
||||
Version: %{nss_version}
|
||||
Release: 11
|
||||
Release: 12
|
||||
License: MPLv2.0
|
||||
URL: http://www.mozilla.org/projects/security/pki/nss/
|
||||
Provides: nss-system-init
|
||||
@ -41,6 +41,7 @@ Patch0: nss-539183.patch
|
||||
Patch1: Bug-1412829-reject-empty-supported_signature_algorit.patch
|
||||
Patch2: Bug-1507135-Add-additional-null-checks-to-CMS-messag.patch
|
||||
Patch3: Bug-1507174-Add-additional-null-checks-to-other-CMS-.patch
|
||||
Patch4: fix-core-dump-when-sigd-signerInfos-is-NULL.patch
|
||||
|
||||
%description
|
||||
Network Security Services (NSS) is a set of libraries designed to
|
||||
@ -131,6 +132,8 @@ pushd nss
|
||||
%patch3 -p1
|
||||
popd
|
||||
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
|
||||
export NSS_FORCE_FIPS=1
|
||||
@ -545,6 +548,9 @@ update-crypto-policies
|
||||
%doc %{_mandir}/man*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.40.1-12
|
||||
- fix core dump when sigd-signerInfos is NULL
|
||||
|
||||
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.40.1-11
|
||||
- add BuildRequires of gdb; build without test
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user