mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
avcodec/adpcmenc: encode all samples of a mono ADPCM_MS block with trellis
Fixes: use of uninitialized memory Fixes: 98u4sU59NEf4 Fixes: AISLE-2026-0150-00113 Use of uninitialized memory Replicated through UnModified FFmpeg with Valgrind Found-by: Joshua Rogers (AISLE)
This commit is contained in:
1 parent
f71410e028
commit
fb13409aaf
1 file changed
+2
-2
@@ -782,9 +782,9 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
if (!buf)
|
||||
return AVERROR(ENOMEM);
|
||||
if (channels == 1) {
|
||||
adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n,
|
||||
adpcm_compress_trellis(avctx, samples, buf, &c->status[0], 2 * n,
|
||||
channels);
|
||||
for (int i = 0; i < n; i += 2)
|
||||
for (int i = 0; i < 2 * n; i += 2)
|
||||
*dst++ = (buf[i] << 4) | buf[i + 1];
|
||||
} else {
|
||||
adpcm_compress_trellis(avctx, samples, buf,
|
||||
|
||||
Reference in new issue
Block a user