Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/cgi/test_cgi_escape.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ def test_cgi_escape_html_nil

def test_cgi_escape_html_large
return if RUBY_ENGINE == 'jruby'
ulong_max, size_max = RbConfig::LIMITS.values_at("ULONG_MAX", "SIZE_MAX")
return unless ulong_max < size_max # Platforms not concerned
ulen_max = 2 ** (RbConfig::SIZEOF.fetch("rb_len_t") { RbConfig::SIZEOF["long"] } * 8) - 1
size_max = RbConfig::LIMITS["SIZE_MAX"]
return unless ulen_max < size_max # Platforms not concerned

size = (ulong_max / 6 + 1)
size = (ulen_max / 6 + 1)
begin
str = '"' * size
escaped = CGI.escapeHTML(str)
Expand Down
Loading