Skip to content

fix(go): guard native text allocation against overflow - #287

Open
cpendery (cpendery) wants to merge 1 commit into
mainfrom
fix/go-native-text-overflow
Open

cpendery (cpendery) wants to merge 1 commit into
mainfrom
fix/go-native-text-overflow

Conversation

@cpendery

@cpendery cpendery (cpendery) commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Guard string length against math.MaxInt-1 before computing len(value)+1 in nativeMemory.text. Oversized strings fail fast with panic("native: string too large"), while valid strings retain existing allocation and pinning behavior. Addresses CodeQL go/allocation-size-overflow.

This branch has not been deployed

No deployments
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