Commit Graph

3 Commits

Author SHA1 Message Date
Milan Kyselica 7a8d4975fe codec_codec2: Only process complete Codec2 frames in decoder
The codec2_samples() function uses floor division (160 * datalen/6)
to compute expected output samples, but the decode loop condition
(x < datalen) iterates with ceiling behavior when datalen is not a
multiple of CODEC2_FRAME_LEN. This mismatch causes the loop to
decode one extra frame beyond what the framework bounds check
budgeted for, leading to an out-of-bounds write on the output buffer.

Change the loop condition to only process complete frames, matching
the floor-division behavior of codec2_samples(). This also prevents
an out-of-bounds read on the input side when fewer than
CODEC2_FRAME_LEN bytes remain.

Resolves: #GHSA-qf8j-jp7h-c5hx
2026-06-25 08:21:35 -06:00
George Joseph 2e6075c51f modules: change module LOAD_FAILUREs to LOAD_DECLINES (master)
Change-Id: Iac40ecb20e10513d67bf0eaf61807f306067b258
2017-04-13 07:46:02 -06:00
Alexander Traud 2e79f52d71 codecs: Add Codec 2 mode 2400.
ASTERISK-26217 #close

Change-Id: I1e45d8084683fab5f2b272bf35f4a149cea8b8d6
2016-08-24 10:41:58 +02:00