X
vorbis_synthesis_restart() is documented to restore the decoder "to the state it was in after vorbis_synthesis_init()" so it can be used when seeking. It resets centerW, pcm_current, pcm_returned, granulepos, sequence, eofflag and the sample count, but not: lW, W, nW — _vds_shared_init() sets them to 0. After a restart, vorbis_synthesis_blockin() takes the old W as the previous block size, so the first block is overlapped with the previous stream's window size, and vorbis_synthesis_lapout()…
X
In the floating-point build, nb_encode() quantizes the open-loop excitation gain with int qe = (int)(floor(.5+3.5*log(ol_gain*1.0/SIG_SCALING))); if (qe<0) qe=0; if (qe>31) qe=31; For some valid input ol_gain is NaN (and log(0) would give -inf), and converting that to int is undefined behavior; the clamp after it doesn't help. UBSan reports it on a freshly created narrowband VBR encoder fed with in-range samples: Tested on main (09b569d1), floating-point build, -fsanitize=address,undefined: /*…
X
With a SpeexBits set up by speex_bits_init_buffer(), if the packed bits end inside the last byte of the buffer, speex_bits_write() never returns. It calls speex_bits_insert_terminator(), whose loop while (bits->bitPtr) speex_bits_pack(bits, 1, 1); relies on each pack advancing bitPtr; with a full non-owned buffer speex_bits_pack() prints "Do not own input buffer: not packing" and returns without packing, so the loop spins forever. A library-owned buffer (speex_bits_init()) is grown instead and…
X
speex_bits_set_bit_buffer() replaces chars and buf_size and sets owner = 0 without looking at the previous buffer. When the struct was set up with speex_bits_init(), the 2000-byte buffer allocated there is no longer referenced, and speex_bits_destroy() does not free it either because owner is now 0. Tested on main (09b569d1), built with -fsanitize=address: #include #include int main(void) { static char data[4] = {0x54, 0x72, (char)0xd4, (char)0xb9}; SpeexBits b; speex_bits_init(&b); /*…
X
Three more decoder fields that SPEEX_RESET_STATE leaves from the previous stream, in addition to the ones in the description. Each of them still makes a reset decoder differ from a freshly created one after every other field has been reset (when the call was added it was described on speex-dev, 2002-12, as resetting the decoder "to its original state (after creation)"): Field Where Effect after reset max_level, min_level (level) nb_decoder_ctl SPEEX_GET_ACTIVITY is computed from the previous…
X
Rebased and extended in !211
X
This is 1.5...2x slower than the approach in !206 (testing with repacketizer_33_long_demo.c) but much simpler. The amount of stack usage is bounded by a constant, and the only limit on the number of extensions in a packet is 2 billion (to fit a count into a 32-bit signed integer).
X
We also still convert extension repacketization to be iterator-based, as it avoids the need to guard against stack overflow, which is still possible even with 1-byte extensions (a 20 kB input packet can still produce 21,424 extensions, which requires 334 kB of extension descriptors, which is larger than the pseudostack).
X
Hi @jmvalin @tterribe, could you please take a look at !208? While this is an edge case, we encountered it in a virtualized deployment where the CPU advertised AVX2, but the OS had not enabled the required register state. This patch checks OS AVX state support before selecting AVX2, allowing Opus to fall back safely. Thanks for your time!
X
Jan Buethe (31b4b362) at 18 Nov 23:39 updating thresholds in osce test
X
This is 1.5...2x slower than the approach in !206 (testing with repacketizer_33_long_demo.c) but much simpler. The amount of stack usage is bounded by a constant, and the only limit on the number of extensions in a packet is 2 billion (to fit a count into a 32-bit signed integer).
X
This is 1.5...2x slower than the approach in !206 (testing with repacketizer_33_long_demo.c) but much simpler. The amount of stack usage is bounded by a constant, and the only limit on the number of extensions in a packet is 2 billion (to fit a count into a 32-bit signed integer).
X
Jan Buethe (3eed50e4) at 18 Nov 19:33 dnn: Omit Conv2D for standalone TinyLACE ... and 10 more commits
X
This PR adds the TinyLACE enhancement model and removes the dependency of enhancement models on deep PLC.
X
Jan Buethe (c3da0345) at 16 Nov 02:57 osce: Add built-in TinyLACE enhancement ... and 2 more commits
X
opus_repacketizer_cat() stores a multi-frame packet's padding only at its starting frame index, so opus_repacketizer_out_range() starting its scan at begin missed extensions from multi-frame packets starting before begin that overlap [begin, end), and failed to filter out extensions falling outside [begin, end) before renumbering frame indices. Scan from frame 0 for any packet whose frame span overlaps [begin, end), and filter parsed extensions to [begin, end) before shifting frame numbers by…
X
Jean-Marc Valin (aba845e6) at 15 Nov 22:15 Fix sub-packet extension slicing in repacketizer
X
Jean-Marc Valin (93d2b374) at 15 Nov 17:04 Avoid rewinding extension iterator on late-frame QEXT decode ... and 2 more commits
X
This hits the encoder's unchecked float-to-int casts (psy.c, res0.c) through a NaN, on ordinary music rather than crafted input. The result is a burst that every player reproduces. What happens bark_noise_hybridmp() in lib/psy.c fits a weighted line over each window: D = tN * tXX - tX * tX; R = (A + x * B) / D; if (R < 0.f) R = 0.f; In one short block (128 bins), first call from _vp_noisemask() (offset 140, fixed -1), bin i = 32, window lo = 28, hi = 35, the values are: tN = 9117.96875 tX =…
X
It is best practice to set the language. It also saves CMake from searching for C++. Rebased pull request from GitHub: https://github.com/xiph/vorbis/pull/88
X
The three vorbisfile fixes from #2362, as a merge request (the same commits as the v2 patches there): ov_time_tell(): after a failed seek the position is unknown (pcm_offset is -1), and the link search ran past the first link and read vf->vi[-1]. It now returns OV_FALSE, matching the -1 that ov_pcm_tell() already returns, documented for both. Adds test_vorbisfile. ov_pcm_seek_page(): when the walk back reaches the start of the link's data without finding a page to restart from, the seek now…
X
valgrind memcheck on a source build (-g) of Icecast 2.5.0 while the server was handling client connections reports: Invalid read of size 8 at thread_create_c (thread.c:318) [also thread.c:322] by source_recheck_mounts (source.c:1592) by _slave_thread (slave.c:943) by _start_routine (thread.c:689) Address ... is 40 bytes inside a block of size 48 free'd at free by _free_thread (thread.c:841) by avl_delete (avl.c:459) by _start_routine (thread.c:694) It looks like a race between a thread that is…
X
Summary In Icecast 2.5.0 every client connect/disconnect adds an event to the global event_queue in src/event_stream.c. The queue is only trimmed by event_stream_cleanup_queue(), which runs inside the "Event Stream Thread". That thread is only created when the first client opens the event stream (/admin/eventfeed). On a normal server nobody does that, so the queue grows without bound. In addition, even when the thread does run, events removed from the head of the queue are only flagged removed…
X
Thank you for your thorough review. I thought this would be a clear issue. If I steal your time, apologies and feel free to close this pull request. I tried to work around Claude Code's security guard-rails. I did not get an example file for crashes. But some more explanations: There’s no good reason for the decoder to accept a dimension-0 codebook. It accepts one because nothing rejects it, not because the format defines it as valid. The header parser doesn’t check dim for every book, so a…
X
Part of the issue is that I am not actually sure this is an accident. Negative counts allow rewinding the stream. That said, none of the Xiph libraries use this feature, and in fact all values passed to these functions (and the corresponding oggpackB_ variant and the custom re-implementation in libtheora) are small and bounded: usually small constants, or the lengths of codewords which can be no larger than 32, and not otherwise subject to attacker control. There may be non-Xiph users of these…
X
Mark Harris (41105874) at 07 Nov 22:07 opusrtp: Show errors from pcap_loop() ... and 6 more commits
X
There is no security concern about an integer divide-by-zero. But without a file to test, it is hard to be sure this patch really fixes an issue. Since it is rejecting files that previously it did not reject, we want to be sure we aren't breaking something. All I can find in the spec about this is, "the partition size must be an even multiple of the codebook dimension," but the spec does not say what to do if it is not, and we do not seem to verify it anywhere (and vorbis_book_decodevs_add(),…