 +        strings::SubstituteAndAppend(contents, "$0 to max, ", range->start);
        } else {
          strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start,
-                                   range->end - 1);
-@@ -2829,6 +2831,8 @@ void EnumDescriptor::DebugString(
+                                      range->end - 1);
+@@ -2815,6 +2817,8 @@ void EnumDescriptor::DebugString(
        const EnumDescriptor::ReservedRange* range = reserved_range(i);
        if (range->end == range->start) {
          strings::SubstituteAndAppend(contents, "$0, ", range->start);

+        strings::SubstituteAndAppend(contents, "$0 to max, ", range->start);
       } else {
         strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start,
                                   range->end);
@@ -4019,6 +4023,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name,
   // Use its file as the parent instead.
   if (parent == nullptr) parent = file_;
 

From f5ce0700d80c776186b0fb0414ef20966a3a6a03 Mon Sep 17 00:00:00 2001
From: "Sana.Kazi" <Sana.Kazi@kpit.com>
Date: Wed, 23 Feb 2022 15:50:16 +0530
Subject: [PATCH] protobuf: Fix CVE-2021-22570

CVE: CVE-2021-22570
Upstream-Status: Backport [https://src.fedoraproject.org/rpms/protobuf/blob/394beeacb500861f76473d47e10314e6a3600810/f/CVE-2021-22570.patch]
Comment: Removed first and second hunk
Signed-off-by: Sana.Kazi <Sana.Kazi@kpit.com>

---
 src/google/protobuf/descriptor.cc | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc
index 6835a3cde..1514ae531 100644
--- a/src/google/protobuf/descriptor.cc
+++ b/src/google/protobuf/descriptor.cc
@@ -2603,6 +2603,8 @@ void Descriptor::DebugString(int depth, std::string* contents,
       const Descriptor::ReservedRange* range = reserved_range(i);
       if (range->end == range->start + 1) {
         strings::SubstituteAndAppend(contents, "$0, ", range->start);
