mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-09-29 17:37:49 -05:00
log_mel_spectrogram reflect-pads the start of the audio buffer by reading 200 samples from samples[1], with no check that the input has that many samples. Audio shorter than 201 samples reads past the end of `samples` (heap out-of-bounds read); the existing minimum-length check runs later, in whisper_full_with_state, after this access. Clamp the reflected count to the available input. Normal-length audio (n_samples >= 201) is unchanged.