Closed lhl2617 closed 3 years ago
Out-of-bounds slicing in Golang is panicky, and manually checking before slicing is tedious. Use a dedicated function with bounds checks for all bytes slicing.
No functional changes are made
Unit tests go test ./...
go test ./...
testhard
@kawmarco has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary
Out-of-bounds slicing in Golang is panicky, and manually checking before slicing is tedious. Use a dedicated function with bounds checks for all bytes slicing.
No functional changes are made
Test plan
Unit tests
go test ./...
testhard