Skip to content

Fix : Prevent stack overflow in clipboard paste - #14

Open
T1anjiu wants to merge 1 commit into
michael105:masterfrom
T1anjiu:fix/p1-2-clipboard-overflow
Open

Fix : Prevent stack overflow in clipboard paste#14
T1anjiu wants to merge 1 commit into
michael105:masterfrom
T1anjiu:fix/p1-2-clipboard-overflow

Conversation

@T1anjiu

@T1anjiu T1anjiu commented Jul 29, 2026

Copy link
Copy Markdown
  • Increased buffer size from [last-data] to [last-data + 1]
  • from_utf8() writes null terminator after data, needs extra byte
  • Prevents 1-byte stack overflow when pasting UTF-8 content
  • Tested: buffer allocation now matches actual write size

- Increased buffer size from [last-data] to [last-data + 1]
- from_utf8() writes null terminator after data, needs extra byte
- Prevents 1-byte stack overflow when pasting UTF-8 content
- Tested: buffer allocation now matches actual write size
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