whisper.cpp/src
Joseph Sellers a88b93f85f
vad : fix buffer overflow in sample reduction loop (#3558)
The buffer size calculation loop (line ~6661) uses `n_samples - 1` as
the upper bound for segment_end_samples, but the copy loop (line 6696)
uses `n_samples`. This inconsistency allows the copy loop to compute
segment_length values up to 1 sample larger per segment than what was
allocated, causing heap corruption.

Symptom: `malloc(): corrupted top size` or `malloc(): invalid size
(unsorted)` crashes after VAD completes sample reduction.

Fix: Use consistent bounds (`n_samples - 1`) in both loops.

Fixes #3403
2025-12-06 12:28:32 +01:00
..
coreml coreml : backport CoreML features to macos < 14 (#3255) 2025-06-24 09:24:27 +02:00
openvino whisper : reorganize source code + improve CMake (#2256) 2024-06-26 19:34:09 +03:00
CMakeLists.txt coreml : backport CoreML features to macos < 14 (#3255) 2025-06-24 09:24:27 +02:00
whisper-arch.h vad : add initial Voice Activity Detection (VAD) support (#3065) 2025-05-12 16:10:11 +02:00
whisper.cpp vad : fix buffer overflow in sample reduction loop (#3558) 2025-12-06 12:28:32 +01:00