asterisk/codecs
Milan Kyselica d4ccfd55ff 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:09 -06:00
..
g722
gsm codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
ilbc codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
lpc10 codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
speex codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
codec_a_mu.c
codec_adpcm.c
codec_alaw.c
codec_codec2.c codec_codec2: Only process complete Codec2 frames in decoder 2026-06-25 08:21:09 -06:00
codec_dahdi.c xml: Embed module information into core XML documentation. 2021-03-16 10:30:43 -05:00
codec_g722.c
codec_g726.c codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
codec_gsm.c
codec_ilbc.c
codec_lpc10.c
codec_resample.c
codec_speex.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
codec_ulaw.c codecs: Remove test-law. 2021-01-04 05:00:58 -06:00
codecs.xml download_externals: Use HTTPS for downloads 2022-03-23 18:06:37 -05:00
ex_adpcm.h
ex_alaw.h various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
ex_codec2.h
ex_g722.h various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
ex_g726.h
ex_gsm.h
ex_ilbc.h
ex_lpc10.h
ex_speex.h
ex_ulaw.h various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
log2comp.h
Makefile