File rubygem-rack-CVE-2024-26141.patch of Package rubygem-rack.32804

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