[libav-commits] adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

2014-06-26 Thread Martin Storsjö
Module: libav
Branch: release/10
Commit: 771564945aa9aebe2f30192b925fcf4909225eca

Author:Martin Storsjö mar...@martin.st
Committer: Luca Barbato lu_z...@gentoo.org
Date:  Thu Jun  5 11:48:53 2014 +0300

adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was samples[avctx-channels + ch], which was correctly
changed into samples_p[ch][1].

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö mar...@martin.st
(cherry picked from commit 3d79d0c93e5b37a35b1b22d6c18699c233aad1ba)
Signed-off-by: Luca Barbato lu_z...@gentoo.org

---

 libavcodec/adpcmenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index fb3ce0d..2cf8d6f 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -549,7 +549,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
 put_bits(pb, 7,  status-step_index);
 if (avctx-trellis  0) {
 uint8_t buf[64];
-adpcm_compress_trellis(avctx, samples_p[ch][1], buf, status,
+adpcm_compress_trellis(avctx, samples_p[ch][0], buf, status,
64, 1);
 for (i = 0; i  64; i++)
 put_bits(pb, 4, buf[i ^ 1]);

___
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

[libav-commits] adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

2014-06-26 Thread Martin Storsjö
Module: libav
Branch: release/9
Commit: 744e7eea5d815efea777b6179d96e8d94b63ccfa

Author:Martin Storsjö mar...@martin.st
Committer: Luca Barbato lu_z...@gentoo.org
Date:  Thu Jun  5 11:48:53 2014 +0300

adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was samples[avctx-channels + ch], which was correctly
changed into samples_p[ch][1].

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö mar...@martin.st
(cherry picked from commit 3d79d0c93e5b37a35b1b22d6c18699c233aad1ba)
Signed-off-by: Luca Barbato lu_z...@gentoo.org

---

 libavcodec/adpcmenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index f81d7fd..116458b 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -557,7 +557,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
 put_bits(pb, 7,  status-step_index);
 if (avctx-trellis  0) {
 uint8_t buf[64];
-adpcm_compress_trellis(avctx, samples_p[ch][1], buf, status,
+adpcm_compress_trellis(avctx, samples_p[ch][0], buf, status,
64, 1);
 for (i = 0; i  64; i++)
 put_bits(pb, 4, buf[i ^ 1]);

___
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

[libav-commits] adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

2014-06-06 Thread Martin Storsjö
Module: libav
Branch: master
Commit: 3d79d0c93e5b37a35b1b22d6c18699c233aad1ba

Author:Martin Storsjö mar...@martin.st
Committer: Martin Storsjö mar...@martin.st
Date:  Thu Jun  5 11:48:53 2014 +0300

adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was samples[avctx-channels + ch], which was correctly
changed into samples_p[ch][1].

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö mar...@martin.st

---

 libavcodec/adpcmenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index fb3ce0d..2cf8d6f 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -549,7 +549,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
 put_bits(pb, 7,  status-step_index);
 if (avctx-trellis  0) {
 uint8_t buf[64];
-adpcm_compress_trellis(avctx, samples_p[ch][1], buf, status,
+adpcm_compress_trellis(avctx, samples_p[ch][0], buf, status,
64, 1);
 for (i = 0; i  64; i++)
 put_bits(pb, 4, buf[i ^ 1]);

___
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits