Skip to content

reject size class lists longer than kNumBaseClasses in sizemap#298

Open
dxbjavid wants to merge 1 commit into
google:masterfrom
dxbjavid:sizemap-class-count-bound
Open

reject size class lists longer than kNumBaseClasses in sizemap#298
dxbjavid wants to merge 1 commit into
google:masterfrom
dxbjavid:sizemap-class-count-bound

Conversation

@dxbjavid

Copy link
Copy Markdown

SetSizeClasses copies one entry per input size class into the class_to_size_, class_to_pages_ and num_objects_to_move_ arrays, which only hold kNumBaseClasses classes, but ValidSizeClasses validates just the first kNumBaseClasses entries and ignores anything beyond that. A size-class list longer than kNumBaseClasses therefore passes validation on its prefix and is then copied past the end of those fixed-size arrays, which is reachable through SizeMap::Init since the sizemap fuzzer drives it with arbitrary lists. This rejects over-long lists in the validator so Init returns false, the same way other malformed configurations are already handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant