- Force C++14 as this code is not C++17 ready

- Fix sprintf format issue
- Fix ordered comparison of a pointer against zero issue
This commit is contained in:
Jeff Law 2020-07-28 11:35:59 -06:00
parent bfdbda4c1e
commit ea4c49c58f
2 changed files with 35 additions and 1 deletions

26
esc-gcc11.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/esc/src/lib/coolkey/CoolKey_Message.cpp b/esc/src/lib/coolkey/CoolKey_Message.cpp
index 87ee309..7b80f70 100644
--- a/esc/src/lib/coolkey/CoolKey_Message.cpp
+++ b/esc/src/lib/coolkey/CoolKey_Message.cpp
@@ -213,7 +213,7 @@ void eCKMessage::setBinValue(string &aKey,unsigned char*aValue,int *aSize)
if(!aKey.length())
return;
- if(aSize <=0 || !aValue)
+ if(aSize ==0 || !aValue)
return;
string data = "";
diff --git a/esc/src/lib/nss-http-client/request.cpp b/esc/src/lib/nss-http-client/request.cpp
index cabd94f..5428350 100644
--- a/esc/src/lib/nss-http-client/request.cpp
+++ b/esc/src/lib/nss-http-client/request.cpp
@@ -192,7 +192,7 @@ PRBool PSHttpRequest::setBody(int size, const char* body) {
}
_bodyLength = size;
- sprintf(_body,body);
+ sprintf(_body,"%s",body);
//_body = (char *)body;
return PR_TRUE;

View File

@ -1,6 +1,6 @@
Name: esc
Version: 1.1.2
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Enterprise Security Client Smart Card Client
License: GPL+
URL: http://directory.fedora.redhat.com/wiki/CoolKey
@ -58,6 +58,7 @@ Source0: http://pki.fedoraproject.org/pki/sources/%name/%{escname}.tar.bz2
Source1: http://pki.fedoraproject.org/pki/sources/%name/esc
Source2: http://pki.fedoraproject.org/pki/sources/%name/esc.desktop
Source3: http://pki.fedoraproject.org/pki/sources/%name/esc.png
Patch0: esc-gcc11.patch
%description
@ -67,10 +68,12 @@ cryptographic smartcards.
%prep
%setup -q -c -n %{escname}
%patch0 -p1
#patch esc
%build
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
echo $RPM_BUILD_DIR
@ -132,6 +135,11 @@ cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir}
%{_datadir}/%{appdir}/esc.desktop
%changelog
* Tue Jul 28 2020 Jeff Law <law@redhat.com> - 1.1.2-7
- Force C++14 as this code is not C++17 ready
- Fix sprintf format issue
- Fix ordered comparison of a pointer against zero issue
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild