add fstack check for protobuf

Signed-off-by: haozi007 <liuhao27@huawei.com>
This commit is contained in:
haozi007 2021-02-20 16:54:58 +08:00
parent f3dbd3f976
commit 798bc657d9
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From dddceb14106499f9fca17e75cdce458a205b102c Mon Sep 17 00:00:00 2001
From: haozi007 <liuhao27@huawei.com>
Date: Sat, 20 Feb 2021 16:52:15 +0800
Subject: [PATCH] add secure compile fs check in Makefile
Signed-off-by: haozi007 <liuhao27@huawei.com>
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 9b7053b..e447b05 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,7 +19,7 @@ PTHREAD_DEF =
endif
PROTOBUF_VERSION = 23:3:0
-PROTOBUF_OPT_FLAG += -Wl,-z,now
+PROTOBUF_OPT_FLAG += -Wl,-z,now -fstack-check
if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison
--
2.25.1

View File

@ -8,13 +8,14 @@
Summary: Protocol Buffers - Google's data interchange format
Name: protobuf
Version: 3.12.3
Release: 14
Release: 15
License: BSD
URL: https://github.com/protocolbuffers/protobuf
Source: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}%{?rcver}/%{name}-all-%{version}%{?rcver}.tar.gz
Source1: protobuf-init.el
Patch9000: 0001-add-secure-compile-option-in-Makefile.patch
Patch9001: 0002-add-secure-compile-fs-check-in-Makefile.patch
BuildRequires: autoconf automake emacs gcc-c++ libtool pkgconfig zlib-devel
@ -304,6 +305,12 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir}
%endif
%changelog
* Sat Feb 20 2021 haozi007 <liuhao27@huawei.com> - 3.12.3-15
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add fstack check
* Tue Sep 1 2020 wutao <wutao61@huawei.com> - 3.12.3-14
- Type:enhancement
- ID:NA