whisper.cpp/tests
Ben Younes 6c6e74c300 whisper : guard null source in buffer loader read callback
whisper_init_from_buffer_with_params_no_state installs a read callback that
copies from buf->buffer + current_offset. When the buffer is exhausted (or the
supplied buffer is empty), size_to_copy is 0 and the source pointer can be null;
passing a null pointer to memcpy is undefined behavior even for a zero-length
copy (UBSan: 'null pointer passed as argument 2' at the memcpy). Loading a
crafted/short model through the buffer loader could hit this.

Skip the memcpy when there is nothing to copy. Loading from a null/empty or
truncated buffer now fails gracefully (returns NULL) with no UB.

This addresses bug 1 of #3879. Bug 2 (integer overflow when sizing the mel
filter buffer) is covered by the open PR #3780.
2026-08-16 16:07:22 +00:00
..
earnings21 vad : Silero VAD v6.2.0 (#3524) 2025-11-17 22:26:17 +09:00
librispeech musa: correct MUSA SDK rc4.0.1 download URL (#3217) 2025-06-03 06:02:12 +02:00
librispeech-parakeet parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
.gitignore tests : adding transcription tests 2022-12-02 21:40:02 +02:00
CMakeLists.txt whisper : guard null source in buffer loader read callback 2026-08-16 16:07:22 +00:00
en-0-ref.txt tests : adding transcription tests 2022-12-02 21:40:02 +02:00
en-1-ref.txt tests : adding transcription tests 2022-12-02 21:40:02 +02:00
en-2-ref.txt tests : adding transcription tests 2022-12-02 21:40:02 +02:00
es-0-ref.txt tests : adding transcription tests 2022-12-02 21:40:02 +02:00
parakeet-expected-diffusion-output.txt parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
parakeet-expected-gb1-output.txt parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
parakeet-expected-jfk-output.txt parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
parakeet-verification.h parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
run-tests.sh parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
test-c.c whisper : reorganize source code + improve CMake (#2256) 2024-06-26 19:34:09 +03:00
test-common-utf8.cpp server : merge split utf-8 token text in verbose json (#3850) 2026-06-02 13:10:27 +02:00
test-parakeet-full.cpp parakeet : add support for NVIDIA Parakeet (#3735) 2026-06-16 20:44:10 +02:00
test-parakeet.cpp parakeet : verify hparams loaded from parakeet model bin file (#3950) 2026-07-30 06:59:23 +02:00
test-vad-full.cpp whisper : expose internal VAD speech segments (#3916) 2026-07-01 13:10:16 +02:00
test-vad.cpp tests : update VAD tests to use Silero V6.2.0 (#3534) 2025-12-06 10:58:58 +01:00
test-whisper-buffer-loader.cpp whisper : guard null source in buffer loader read callback 2026-08-16 16:07:22 +00:00
test-whisper.js Node.js package (#260) 2022-12-12 20:17:27 +02:00