[FFmpeg-cvslog] avi: Validate sample_size

2015-06-01 Thread Andreas Cadhalpun
ffmpeg | branch: release/2.2 | Andreas Cadhalpun 
andreas.cadhal...@googlemail.com | Wed May  6 02:26:57 2015 +0200| 
[0654518597e6ee2947e4a81c26f03f9aec7ef656] | committer: Reinhard Tartler

avi: Validate sample_size

And either error out or set it to 0 if it is negative.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org
(cherry picked from commit a55a70644872027fdf76a75edf12a09c9008880f)
Signed-off-by: Reinhard Tartler siret...@tauware.de

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

 libavformat/avidec.c |   17 +
 1 file changed, 17 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index e851f0b..0423da2 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -569,6 +569,23 @@ static int avi_read_header(AVFormatContext *s)
 av_log(s, AV_LOG_ERROR, unknown stream type %X\n, tag1);
 goto fail;
 }
+
+if (ast-sample_size  0) {
+if (s-error_recognition  AV_EF_EXPLODE) {
+av_log(s, AV_LOG_ERROR,
+   Invalid sample_size %d at stream %d\n,
+   ast-sample_size,
+   stream_index);
+goto fail;
+}
+av_log(s, AV_LOG_WARNING,
+   Invalid sample_size %d at stream %d 
+   setting it to 0\n,
+   ast-sample_size,
+   stream_index);
+ast-sample_size = 0;
+}
+
 if (ast-sample_size == 0)
 st-duration = st-nb_frames;
 ast-frame_offset = ast-cum_len;

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


[FFmpeg-cvslog] avi: Validate sample_size

2015-05-19 Thread Andreas Cadhalpun
ffmpeg | branch: release/2.4 | Andreas Cadhalpun 
andreas.cadhal...@googlemail.com | Wed May  6 02:26:57 2015 +0200| 
[a55a70644872027fdf76a75edf12a09c9008880f] | committer: Vittorio Giovara

avi: Validate sample_size

And either error out or set it to 0 if it is negative.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org

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

 libavformat/avidec.c |   17 +
 1 file changed, 17 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index c24a6c4..54c4814 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -569,6 +569,23 @@ static int avi_read_header(AVFormatContext *s)
 av_log(s, AV_LOG_ERROR, unknown stream type %X\n, tag1);
 goto fail;
 }
+
+if (ast-sample_size  0) {
+if (s-error_recognition  AV_EF_EXPLODE) {
+av_log(s, AV_LOG_ERROR,
+   Invalid sample_size %d at stream %d\n,
+   ast-sample_size,
+   stream_index);
+goto fail;
+}
+av_log(s, AV_LOG_WARNING,
+   Invalid sample_size %d at stream %d 
+   setting it to 0\n,
+   ast-sample_size,
+   stream_index);
+ast-sample_size = 0;
+}
+
 if (ast-sample_size == 0)
 st-duration = st-nb_frames;
 ast-frame_offset = ast-cum_len;

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


[FFmpeg-cvslog] avi: Validate sample_size

2015-05-14 Thread Andreas Cadhalpun
ffmpeg | branch: release/2.6 | Andreas Cadhalpun 
andreas.cadhal...@googlemail.com | Wed May  6 02:26:57 2015 +0200| 
[0f7e67be3a56e20abcabf9e6698935e6188e7282] | committer: Andreas Cadhalpun

avi: Validate sample_size

And either error out or set it to 0 if it is negative.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org
(cherry picked from commit 4d0ee4962be7e07cdc038a78008ef2e4e47e5f81)
Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com

Conflicts:
libavformat/avidec.c

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

 libavformat/avidec.c |   17 +
 1 file changed, 17 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index fbfd913..9bb3920 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -692,6 +692,23 @@ static int avi_read_header(AVFormatContext *s)
 default:
 av_log(s, AV_LOG_INFO, unknown stream type %X\n, tag1);
 }
+
+if (ast-sample_size  0) {
+if (s-error_recognition  AV_EF_EXPLODE) {
+av_log(s, AV_LOG_ERROR,
+   Invalid sample_size %d at stream %d\n,
+   ast-sample_size,
+   stream_index);
+goto fail;
+}
+av_log(s, AV_LOG_WARNING,
+   Invalid sample_size %d at stream %d 
+   setting it to 0\n,
+   ast-sample_size,
+   stream_index);
+ast-sample_size = 0;
+}
+
 if (ast-sample_size == 0) {
 st-duration = st-nb_frames;
 if (st-duration  0  avi-io_fsize  0  avi-riff_end  
avi-io_fsize) {

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


[FFmpeg-cvslog] avi: Validate sample_size

2015-05-10 Thread Andreas Cadhalpun
ffmpeg | branch: master | Andreas Cadhalpun andreas.cadhal...@googlemail.com 
| Wed May  6 02:26:57 2015 +0200| [4d0ee4962be7e07cdc038a78008ef2e4e47e5f81] | 
committer: Luca Barbato

avi: Validate sample_size

And either error out or set it to 0 if it is negative.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org

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

 libavformat/avidec.c |   17 +
 1 file changed, 17 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b317b26..4caba46 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -571,6 +571,23 @@ static int avi_read_header(AVFormatContext *s)
 av_log(s, AV_LOG_ERROR, unknown stream type %X\n, tag1);
 goto fail;
 }
+
+if (ast-sample_size  0) {
+if (s-error_recognition  AV_EF_EXPLODE) {
+av_log(s, AV_LOG_ERROR,
+   Invalid sample_size %d at stream %d\n,
+   ast-sample_size,
+   stream_index);
+goto fail;
+}
+av_log(s, AV_LOG_WARNING,
+   Invalid sample_size %d at stream %d 
+   setting it to 0\n,
+   ast-sample_size,
+   stream_index);
+ast-sample_size = 0;
+}
+
 if (ast-sample_size == 0)
 st-duration = st-nb_frames;
 ast-frame_offset = ast-cum_len;

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