diff options
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch b/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch index be3180181a..bb9594e968 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch +++ b/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch | |||
@@ -1,13 +1,22 @@ | |||
1 | From f5ce0700d80c776186b0fb0414ef20966a3a6a03 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Sana.Kazi" <Sana.Kazi@kpit.com> | ||
3 | Date: Wed, 23 Feb 2022 15:50:16 +0530 | ||
4 | Subject: [PATCH] protobuf: Fix CVE-2021-22570 | ||
5 | |||
1 | CVE: CVE-2021-22570 | 6 | CVE: CVE-2021-22570 |
2 | Upstream-Status: Backport [https://src.fedoraproject.org/rpms/protobuf/blob/394beeacb500861f76473d47e10314e6a3600810/f/CVE-2021-22570.patch] | 7 | Upstream-Status: Backport [https://src.fedoraproject.org/rpms/protobuf/blob/394beeacb500861f76473d47e10314e6a3600810/f/CVE-2021-22570.patch] |
3 | Comment: Removed first and second hunk | 8 | Comment: Removed first and second hunk |
4 | Signed-off-by: Sana.Kazi <Sana.Kazi@kpit.com> | 9 | Signed-off-by: Sana.Kazi <Sana.Kazi@kpit.com> |
5 | 10 | ||
11 | --- | ||
12 | src/google/protobuf/descriptor.cc | 20 ++++++++++++++++++++ | ||
13 | 1 file changed, 20 insertions(+) | ||
14 | |||
6 | diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc | 15 | diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc |
7 | index 7af37c57f3..03c4e2b516 100644 | 16 | index 6835a3cde..1514ae531 100644 |
8 | --- a/src/google/protobuf/descriptor.cc | 17 | --- a/src/google/protobuf/descriptor.cc |
9 | +++ b/src/google/protobuf/descriptor.cc | 18 | +++ b/src/google/protobuf/descriptor.cc |
10 | @@ -2626,6 +2626,8 @@ void Descriptor::DebugString(int depth, std::string* contents, | 19 | @@ -2603,6 +2603,8 @@ void Descriptor::DebugString(int depth, std::string* contents, |
11 | const Descriptor::ReservedRange* range = reserved_range(i); | 20 | const Descriptor::ReservedRange* range = reserved_range(i); |
12 | if (range->end == range->start + 1) { | 21 | if (range->end == range->start + 1) { |
13 | strings::SubstituteAndAppend(contents, "$0, ", range->start); | 22 | strings::SubstituteAndAppend(contents, "$0, ", range->start); |
@@ -15,8 +24,8 @@ index 7af37c57f3..03c4e2b516 100644 | |||
15 | + strings::SubstituteAndAppend(contents, "$0 to max, ", range->start); | 24 | + strings::SubstituteAndAppend(contents, "$0 to max, ", range->start); |
16 | } else { | 25 | } else { |
17 | strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start, | 26 | strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start, |
18 | range->end - 1); | 27 | range->end - 1); |
19 | @@ -2829,6 +2831,8 @@ void EnumDescriptor::DebugString( | 28 | @@ -2815,6 +2817,8 @@ void EnumDescriptor::DebugString( |
20 | const EnumDescriptor::ReservedRange* range = reserved_range(i); | 29 | const EnumDescriptor::ReservedRange* range = reserved_range(i); |
21 | if (range->end == range->start) { | 30 | if (range->end == range->start) { |
22 | strings::SubstituteAndAppend(contents, "$0, ", range->start); | 31 | strings::SubstituteAndAppend(contents, "$0, ", range->start); |
@@ -24,8 +33,8 @@ index 7af37c57f3..03c4e2b516 100644 | |||
24 | + strings::SubstituteAndAppend(contents, "$0 to max, ", range->start); | 33 | + strings::SubstituteAndAppend(contents, "$0 to max, ", range->start); |
25 | } else { | 34 | } else { |
26 | strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start, | 35 | strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start, |
27 | range->end); | 36 | range->end); |
28 | @@ -4019,6 +4023,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name, | 37 | @@ -4002,6 +4006,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name, |
29 | // Use its file as the parent instead. | 38 | // Use its file as the parent instead. |
30 | if (parent == nullptr) parent = file_; | 39 | if (parent == nullptr) parent = file_; |
31 | 40 | ||
@@ -37,7 +46,7 @@ index 7af37c57f3..03c4e2b516 100644 | |||
37 | if (tables_->AddSymbol(full_name, symbol)) { | 46 | if (tables_->AddSymbol(full_name, symbol)) { |
38 | if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) { | 47 | if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) { |
39 | // This is only possible if there was already an error adding something of | 48 | // This is only possible if there was already an error adding something of |
40 | @@ -4059,6 +4068,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name, | 49 | @@ -4041,6 +4050,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name, |
41 | void DescriptorBuilder::AddPackage(const std::string& name, | 50 | void DescriptorBuilder::AddPackage(const std::string& name, |
42 | const Message& proto, | 51 | const Message& proto, |
43 | const FileDescriptor* file) { | 52 | const FileDescriptor* file) { |
@@ -49,7 +58,7 @@ index 7af37c57f3..03c4e2b516 100644 | |||
49 | if (tables_->AddSymbol(name, Symbol(file))) { | 58 | if (tables_->AddSymbol(name, Symbol(file))) { |
50 | // Success. Also add parent package, if any. | 59 | // Success. Also add parent package, if any. |
51 | std::string::size_type dot_pos = name.find_last_of('.'); | 60 | std::string::size_type dot_pos = name.find_last_of('.'); |
52 | @@ -4372,6 +4386,12 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( | 61 | @@ -4354,6 +4368,12 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( |
53 | } | 62 | } |
54 | result->pool_ = pool_; | 63 | result->pool_ = pool_; |
55 | 64 | ||