Skip to content

- Add monotonicity and boundary checks for input_splits (sentencepiece_detokenizer_kernel.cc, sentencepiece_detokenizer_tflite.cc) to prevent invalid memory allocations and memory-wrapping pointer arithmetic.#1508

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_911570735
May 8, 2026

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

  • Add monotonicity and boundary checks for input_splits (sentencepiece_detokenizer_kernel.cc, sentencepiece_detokenizer_tflite.cc) to prevent invalid memory allocations and memory-wrapping pointer arithmetic.
    • Validate prefix replacement tries and lattice scoring IDs against buffer ranges (optimized_encoder.cc) to prevent out-of-bounds memory reads.

@copybara-service copybara-service Bot force-pushed the test_911570735 branch 6 times, most recently from e3c7de0 to 4b4b940 Compare May 8, 2026 15:49
…piece_detokenizer_kernel.cc`, `sentencepiece_detokenizer_tflite.cc`) to prevent invalid memory allocations and memory-wrapping pointer arithmetic.

  - Validate prefix replacement tries and lattice scoring IDs against buffer ranges (`optimized_encoder.cc`) to prevent out-of-bounds memory reads.

PiperOrigin-RevId: 912547401
@copybara-service copybara-service Bot merged commit 58706d2 into master May 8, 2026
@copybara-service copybara-service Bot deleted the test_911570735 branch May 8, 2026 15:50
@github-pages github-pages Bot temporarily deployed to github-pages May 8, 2026 15:51 Inactive
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