Skip to content

Commit ba8fb0f

Browse files
authored
Merge pull request #1023 from mbaynton/range_dos
Limit the maximum array size produced by range().
2 parents 2d47e70 + 1fd4332 commit ba8fb0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/parser/functions/range.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module Puppet::Parser::Functions
8484
when '...' then (start...stop) # Exclusive of last element
8585
end
8686

87-
result = range.step(step).to_a
87+
result = range.step(step).first(1_000_000).to_a
8888

8989
return result
9090
end

0 commit comments

Comments
 (0)