File rubygem-rack-1_4-CVE-2024-26141.patch of Package rubygem-rack-1_4.33004

Index: rack-1.4.5/lib/rack/utils.rb
===================================================================
--- rack-1.4.5.orig/lib/rack/utils.rb
+++ rack-1.4.5/lib/rack/utils.rb
@@ -345,6 +345,9 @@ module Rack
         end
         ranges << (r0..r1)  if r0 <= r1
       end
+
+      return [] if ranges.map(&:size).sum > size
+
       ranges
     end
     module_function :byte_ranges
openSUSE Build Service is sponsored by