@@ -30,7 +30,7 @@ def read_prelude(chunk, offset)
30
30
end
31
31
32
32
def valid_lengths? ( total_length , headers_length )
33
- validate_length_constraints ( total_length , headers_length )
33
+ valid_length_constraints? ( total_length , headers_length )
34
34
end
35
35
36
36
def calculate_positions ( offset , total_length , headers_length )
@@ -67,7 +67,7 @@ def scan_range(chunk, start_offset)
67
67
68
68
def valid_prelude_at_position? ( chunk , pos )
69
69
lengths = extract_potential_lengths ( chunk , pos )
70
- validate_length_constraints ( *lengths )
70
+ valid_length_constraints? ( *lengths )
71
71
end
72
72
73
73
def extract_potential_lengths ( chunk , pos )
@@ -77,7 +77,7 @@ def extract_potential_lengths(chunk, pos)
77
77
]
78
78
end
79
79
80
- def validate_length_constraints ( total_length , headers_length )
80
+ def valid_length_constraints? ( total_length , headers_length )
81
81
return false if total_length . nil? || headers_length . nil?
82
82
return false if total_length <= 0 || total_length > 1_000_000
83
83
return false if headers_length <= 0 || headers_length >= total_length
0 commit comments