[FFmpeg-cvslog] avcodec/smacker: Check that the data size is a multiple of a sample vector

2015-11-15 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Nov 15 14:52:08 2015 +0100| [4a9af07a49295e014b059c1ab624c40345af5892] | 
committer: Michael Niedermayer

avcodec/smacker: Check that the data size is a multiple of a sample vector

Fixes out of array access
Fixes: 
ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a9af07a49295e014b059c1ab624c40345af5892
---

 libavcodec/smacker.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b2fc29b..4014e8d 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -670,6 +670,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* get output buffer */
 frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
+if (unp_size % (avctx->channels * (bits + 1))) {
+av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size);
+return AVERROR(EINVAL);
+}
 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 samples  = (int16_t *)frame->data[0];

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/smacker: Check that the data size is a multiple of a sample vector

2015-11-18 Thread Michael Niedermayer
ffmpeg | branch: release/2.7 | Michael Niedermayer  | 
Sun Nov 15 14:52:08 2015 +0100| [10398038239b6357a6ebe6f7ba0836280a2673fc] | 
committer: Michael Niedermayer

avcodec/smacker: Check that the data size is a multiple of a sample vector

Fixes out of array access
Fixes: 
ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 4a9af07a49295e014b059c1ab624c40345af5892)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10398038239b6357a6ebe6f7ba0836280a2673fc
---

 libavcodec/smacker.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b5538c7..7b30664 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -668,6 +668,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* get output buffer */
 frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
+if (unp_size % (avctx->channels * (bits + 1))) {
+av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size);
+return AVERROR(EINVAL);
+}
 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 samples  = (int16_t *)frame->data[0];

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/smacker: Check that the data size is a multiple of a sample vector

2015-11-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.6 | Michael Niedermayer  | 
Sun Nov 15 14:52:08 2015 +0100| [cf2d26eacf6226e525e6643dcc3919702359485a] | 
committer: Michael Niedermayer

avcodec/smacker: Check that the data size is a multiple of a sample vector

Fixes out of array access
Fixes: 
ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 4a9af07a49295e014b059c1ab624c40345af5892)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf2d26eacf6226e525e6643dcc3919702359485a
---

 libavcodec/smacker.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b5538c7..7b30664 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -668,6 +668,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* get output buffer */
 frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
+if (unp_size % (avctx->channels * (bits + 1))) {
+av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size);
+return AVERROR(EINVAL);
+}
 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 samples  = (int16_t *)frame->data[0];

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/smacker: Check that the data size is a multiple of a sample vector

2015-11-26 Thread Michael Niedermayer
ffmpeg | branch: release/2.8 | Michael Niedermayer  | 
Sun Nov 15 14:52:08 2015 +0100| [093e58228e77f28fd8adf50435b30dcb9b246164] | 
committer: Michael Niedermayer

avcodec/smacker: Check that the data size is a multiple of a sample vector

Fixes out of array access
Fixes: 
ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 4a9af07a49295e014b059c1ab624c40345af5892)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=093e58228e77f28fd8adf50435b30dcb9b246164
---

 libavcodec/smacker.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b2fc29b..4014e8d 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -670,6 +670,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* get output buffer */
 frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
+if (unp_size % (avctx->channels * (bits + 1))) {
+av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size);
+return AVERROR(EINVAL);
+}
 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 samples  = (int16_t *)frame->data[0];

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/smacker: Check that the data size is a multiple of a sample vector

2015-11-26 Thread Michael Niedermayer
ffmpeg | branch: release/2.5 | Michael Niedermayer  | 
Sun Nov 15 14:52:08 2015 +0100| [2b0cda395f2330fc0dbebadb612b758bf46ccf47] | 
committer: Michael Niedermayer

avcodec/smacker: Check that the data size is a multiple of a sample vector

Fixes out of array access
Fixes: 
ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 4a9af07a49295e014b059c1ab624c40345af5892)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b0cda395f2330fc0dbebadb612b758bf46ccf47
---

 libavcodec/smacker.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b5538c7..7b30664 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -668,6 +668,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* get output buffer */
 frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
+if (unp_size % (avctx->channels * (bits + 1))) {
+av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size);
+return AVERROR(EINVAL);
+}
 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 samples  = (int16_t *)frame->data[0];

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/smacker: Check that the data size is a multiple of a sample vector

2015-12-06 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | 
Sun Nov 15 14:52:08 2015 +0100| [3449b47dc548fdc91ee46c6e3de04ad8b6b3d045] | 
committer: Michael Niedermayer

avcodec/smacker: Check that the data size is a multiple of a sample vector

Fixes out of array access
Fixes: 
ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 4a9af07a49295e014b059c1ab624c40345af5892)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3449b47dc548fdc91ee46c6e3de04ad8b6b3d045
---

 libavcodec/smacker.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 518bdad..bdabe7f 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -667,6 +667,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* get output buffer */
 frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
+if (unp_size % (avctx->channels * (bits + 1))) {
+av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size);
+return AVERROR(EINVAL);
+}
 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 samples  = (int16_t *)frame->data[0];

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog