Repository navigation
v3.0.2
Security
- Bug 1 (print_matching_items newline cache): Fixed heap buffer overflow caused by integer multiplication wraparound when allocating the newline-position cache on 32-bit systems (#44).
- Bug 2 (print_matching_items trailing newline write): Fixed heap buffer overflow by accurately simulating formatted line size accounting for duplicate and overlapping multi-pattern matches (#44).
- Bug 3 (search_file read loop): Fixed heap buffer overflow when reading files with apparent sizes exceeding representation limits by safely validating signed
fstatfile size (#44). - Bug 4 (gitignore_add_pattern): Fixed heap buffer overflow on allocation failure by updating logical capacity only after successful
reallocand adding integer overflow checks (#44). - Bug 5 (simd_sse42_search): Fixed heap buffer over-read in SSE4.2 string search for patterns shorter than 16 bytes by reading through a safe bounded zero-padded buffer (#44).
Verification
- Added unit and CLI regression tests covering duplicate match formatting, short pattern file searches, and gitignore filtering.
- Validated with AddressSanitizer on Linux and macOS across unit, directory, and CLI test suites.
Fixes #44.
Full Changelog: v3.0.1...v3.0.2