Project
vgrep
Description
In search_tui.rs line 220, the cursor position is calculated as area.x + self.input.len() as u16 + 1. If the input length exceeds u16::MAX - area.x - 1, this will overflow, causing the cursor to wrap around or panic.
Error Message
Debug Logs
System Information
OS: Any
Rust Version: 1.75+
Screenshots
No response
Steps to Reproduce
- Open vgrep TUI
- Paste an extremely long string (65535+ characters)
- Observe cursor behavior
Expected Behavior
Cursor should be constrained to the visible area, or input should be truncated with indication
Actual Behavior
Integer overflow in cursor position calculation
Additional Context
No response
Project
vgrep
Description
In
search_tui.rsline 220, the cursor position is calculated asarea.x + self.input.len() as u16 + 1. If the input length exceedsu16::MAX - area.x - 1, this will overflow, causing the cursor to wrap around or panic.Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
Expected Behavior
Cursor should be constrained to the visible area, or input should be truncated with indication
Actual Behavior
Integer overflow in cursor position calculation
Additional Context
No response