whisper.cpp/bindings
OrbisAI Security b3877e10c0
fix: in bindings/ruby/test/jfk_reader/jfk_reader in jfk_reader.c (#3756)
* fix: V-002 security vulnerability

Automated security fix generated by Orbis Security AI

* fix(ruby): use Ruby allocator macros in jfk_reader and fix memory leak

- Replace calloc/free with ALLOC_N/xfree to match Ruby binding conventions
  (ALLOC_N handles overflow checking and raises NoMemoryError on failure)
- Free temporary samples buffer after conversion loop (was leaked)
- Add NULL check for fopen return value with rb_raise
- Add comment clarifying n_samples is a compile-time constant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ruby): return false instead of rb_raise in memory_view callback

rb_memory_view_get_func_t callbacks should communicate errors via
return value (false), not exceptions. rb_memory_view_get has no
exception-handling wrapper around get_func calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* replacing ALLOC_N with rb_protect as ALLOC_N raises Ruby exceptions

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-25 08:19:23 +02:00
..
go whisper : fix max_tokens skipping remaining audio (#3798) 2026-05-13 07:32:00 +02:00
java whisper : add support for --carry-initial-prompt (#3395) 2025-10-10 19:51:15 +03:00
javascript release : v1.8.4 2026-03-19 10:40:13 +02:00
ruby fix: in bindings/ruby/test/jfk_reader/jfk_reader in jfk_reader.c (#3756) 2026-05-25 08:19:23 +02:00
CMakeLists.txt Node.js package (#260) 2022-12-12 20:17:27 +02:00