!18 fix build error

From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-07-13 11:20:11 +00:00 committed by Gitee
commit 02ed8cfa3b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff --git a/src/lib/coolkey/CoolKey_Message.cpp b/src/lib/coolkey/CoolKey_Message.cpp
index 87ee309..7b80f70 100644
--- a/src/lib/coolkey/CoolKey_Message.cpp
+++ b/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/src/lib/nss-http-client/request.cpp b/src/lib/nss-http-client/request.cpp
index cabd94f..5428350 100644
--- a/src/lib/nss-http-client/request.cpp
+++ b/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: 5
Release: 6
Summary: esc embeds files into go programs and provides http
License: GPL+
URL: https://github.com/mjibson/esc
@ -8,6 +8,7 @@ Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar
Source1: esc
Source2: esc.desktop
Source3: esc.png
Patch0: Fix-compilation-failure-caused-by-gcc12.patch
BuildRequires: glib2-devel atk-devel pkgconfig nspr-devel nss-devel nss-static
BuildRequires: pcsc-lite-devel desktop-file-utils dbus-glib-devel glib2-devel gcc-c++
@ -86,6 +87,9 @@ echo "/usr/local/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%defattr(-,root,root)
%changelog
* Thu Jul 13 2023 liyanan <thistleslyn@163.com> - 1.1.2-6
- fix build error
* Sat Jul 30 2022 yaoxin <yaoxin30@h-partners.com> - 1.1.2-5
- Remove rpath
- Add chrpath in BuildRequire