From 3761c02a364c82a5862217a11ab5026fb010dfc8 Mon Sep 17 00:00:00 2001 From: zhongtao Date: Sat, 27 May 2023 10:45:07 +0800 Subject: [PATCH] test Signed-off-by: zhongtao --- 0007-test.patch | 25 +++++++++++++++++++++++++ protobuf.spec | 5 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 0007-test.patch diff --git a/0007-test.patch b/0007-test.patch new file mode 100644 index 0000000..7bdc396 --- /dev/null +++ b/0007-test.patch @@ -0,0 +1,25 @@ +From d87245ab69b86ce75b8b3a1ef0cab33c68296eb6 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Sat, 27 May 2023 11:52:53 +0800 +Subject: [PATCH] test + +Signed-off-by: zhongtao +--- + src/google/protobuf/wire_format.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/google/protobuf/wire_format.cc b/src/google/protobuf/wire_format.cc +index c7d20b6..55a3f45 100644 +--- a/src/google/protobuf/wire_format.cc ++++ b/src/google/protobuf/wire_format.cc +@@ -1648,6 +1648,7 @@ size_t WireFormat::FieldDataOnlyByteSize(const FieldDescriptor* field, + // Map entry fields always need to be serialized. + count = 1; + } else if (message_reflection->HasField(message, field)) { ++ count = 0; + count = 1; + } + +-- +2.40.1 + diff --git a/protobuf.spec b/protobuf.spec index fa25507..57ae24e 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -8,7 +8,7 @@ Summary: Protocol Buffers - Google's data interchange format Name: protobuf Version: 3.14.0 -Release: 6 +Release: 7 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 @@ -20,6 +20,7 @@ Patch9002: 0003-fix-CVE-2021-22570.patch Patch9003: 0004-Improve-performance-of-parsing-unknown-fields-in-Jav.patch Patch9004: 0005-fix-CVE-2022-1941.patch Patch9005: 0006-fix-CVE-2022-3171.patch +Patch9006: 0007-test.patch BuildRequires: make autoconf automake emacs gcc-c++ libtool pkgconfig zlib-devel @@ -325,7 +326,7 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %endif %changelog -* Tue Oct 18 2022 chengzeruizhi - 3.14.0-6 +* Tue Oct 18 2022 chengzerui - 3.14.0-6 - Type:bugfix - ID:NA - SUG:NA -- Gitee