Skip to content

Validate Python buffer inputs before converting them to byte views#625

Open
uwezkhan wants to merge 1 commit intogoogle:mainfrom
uwezkhan:fix/python-buffer-validation
Open

Validate Python buffer inputs before converting them to byte views#625
uwezkhan wants to merge 1 commit intogoogle:mainfrom
uwezkhan:fix/python-buffer-validation

Conversation

@uwezkhan
Copy link
Copy Markdown

Harden the Python _re2 binding so it only accepts safe byte buffers. The patch rejects non-contiguous, multi-byte, and non-1D buffer-protocol inputs before converting them into absl::string_view, preventing incorrect parsing and unintended native memory access patterns.

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