[FFmpeg-cvslog] avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component( )

2015-12-06 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | 
Sun Nov 15 20:03:39 2015 +0100| [aa780a52717eda9476fcda4a6c68e781974ad7c2] | 
committer: Michael Niedermayer

avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component()

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 016fd413f9168816924f21c0c1ffb578f7226221)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index ede1a79..6b60e3d 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "jpeg2000.h"
@@ -210,7 +211,10 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
codsty->nreslevels2decode - 1,
codsty->transform))
 return ret;
-// component size comp->coord is uint16_t so ir cannot overflow
+
+if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0],
+comp->coord[1][1] - comp->coord[1][0], 0, avctx))
+return AVERROR_INVALIDDATA;
 csize = (comp->coord[0][1] - comp->coord[0][0]) *
 (comp->coord[1][1] - comp->coord[1][0]);
 

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


[FFmpeg-cvslog] avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component( )

2015-11-26 Thread Michael Niedermayer
ffmpeg | branch: release/2.8 | Michael Niedermayer  | 
Sun Nov 15 20:03:39 2015 +0100| [9a9dda615ba5745b5ced56a7e5e7d87a326e4763] | 
committer: Michael Niedermayer

avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component()

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 016fd413f9168816924f21c0c1ffb578f7226221)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 11b2487..abf8834 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "jpeg2000.h"
@@ -210,7 +211,10 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
codsty->nreslevels2decode - 1,
codsty->transform))
 return ret;
-// component size comp->coord is uint16_t so ir cannot overflow
+
+if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0],
+comp->coord[1][1] - comp->coord[1][0], 0, avctx))
+return AVERROR_INVALIDDATA;
 csize = (comp->coord[0][1] - comp->coord[0][0]) *
 (comp->coord[1][1] - comp->coord[1][0]);
 if (comp->coord[0][1] - comp->coord[0][0] > 32768 ||

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


[FFmpeg-cvslog] avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component( )

2015-11-26 Thread Michael Niedermayer
ffmpeg | branch: release/2.5 | Michael Niedermayer  | 
Sun Nov 15 20:03:39 2015 +0100| [7468cb847c4ffbb8afeb22e4293e245686e8e13a] | 
committer: Michael Niedermayer

avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component()

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 016fd413f9168816924f21c0c1ffb578f7226221)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 644e25d..2fe2038 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "jpeg2000.h"
@@ -210,7 +211,10 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
codsty->nreslevels2decode - 1,
codsty->transform))
 return ret;
-// component size comp->coord is uint16_t so ir cannot overflow
+
+if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0],
+comp->coord[1][1] - comp->coord[1][0], 0, avctx))
+return AVERROR_INVALIDDATA;
 csize = (comp->coord[0][1] - comp->coord[0][0]) *
 (comp->coord[1][1] - comp->coord[1][0]);
 

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


[FFmpeg-cvslog] avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component( )

2015-11-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.6 | Michael Niedermayer  | 
Sun Nov 15 20:03:39 2015 +0100| [8930b2d532c9ba1c7b7b0cdb7828acc0e13968c5] | 
committer: Michael Niedermayer

avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component()

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 016fd413f9168816924f21c0c1ffb578f7226221)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 644e25d..2fe2038 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "jpeg2000.h"
@@ -210,7 +211,10 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
codsty->nreslevels2decode - 1,
codsty->transform))
 return ret;
-// component size comp->coord is uint16_t so ir cannot overflow
+
+if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0],
+comp->coord[1][1] - comp->coord[1][0], 0, avctx))
+return AVERROR_INVALIDDATA;
 csize = (comp->coord[0][1] - comp->coord[0][0]) *
 (comp->coord[1][1] - comp->coord[1][0]);
 

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


[FFmpeg-cvslog] avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component( )

2015-11-18 Thread Michael Niedermayer
ffmpeg | branch: release/2.7 | Michael Niedermayer  | 
Sun Nov 15 20:03:39 2015 +0100| [d972df307aaa593e5c3f2a7a23570c63665ed601] | 
committer: Michael Niedermayer

avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component()

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 016fd413f9168816924f21c0c1ffb578f7226221)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 38df58d..064981f 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "jpeg2000.h"
@@ -210,7 +211,10 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
codsty->nreslevels2decode - 1,
codsty->transform))
 return ret;
-// component size comp->coord is uint16_t so ir cannot overflow
+
+if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0],
+comp->coord[1][1] - comp->coord[1][0], 0, avctx))
+return AVERROR_INVALIDDATA;
 csize = (comp->coord[0][1] - comp->coord[0][0]) *
 (comp->coord[1][1] - comp->coord[1][0]);
 

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


[FFmpeg-cvslog] avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component( )

2015-11-15 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Nov 15 20:03:39 2015 +0100| [016fd413f9168816924f21c0c1ffb578f7226221] | 
committer: Michael Niedermayer

avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component()

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index d9869fd..a1ef396 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "jpeg2000.h"
@@ -461,7 +462,10 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
codsty->nreslevels2decode - 1,
codsty->transform))
 return ret;
-// component size comp->coord is uint16_t so ir cannot overflow
+
+if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0],
+comp->coord[1][1] - comp->coord[1][0], 0, avctx))
+return AVERROR_INVALIDDATA;
 csize = (comp->coord[0][1] - comp->coord[0][0]) *
 (comp->coord[1][1] - comp->coord[1][0]);
 

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