]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
whisper : heap out-of-bounds read in log_mel_spectrogram on very short audio (#3956)
authorMd Shafiuzzaman <redacted>
Fri, 7 Aug 2026 06:17:31 +0000 (23:17 -0700)
committerGitHub <redacted>
Fri, 7 Aug 2026 06:17:31 +0000 (08:17 +0200)
commit8631825d41a2712268813981a9550b04a3f225e5
treec12926f9591f62b26383d740c5fe3d097dac027b
parentdf1547b6fe362556e48fd21f386c6eee85b971fe
whisper : heap out-of-bounds read in log_mel_spectrogram on very short audio (#3956)

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.
src/whisper.cpp