[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

2015-12-06 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | 
Sun Nov 15 21:17:05 2015 +0100| [f1058efc8160affedc90abd75245d6d96d9aa0e9] | 
committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 65d3359fb366ea265a8468d76a111cb7352f0b55)

Conflicts:

libavcodec/jpeg2000dec.c

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

 libavcodec/jpeg2000dec.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index ab34df0..ee4f195 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -688,10 +688,10 @@ static int init_tile(Jpeg2000DecoderContext *s, int 
tileno)
 Jpeg2000QuantStyle  *qntsty = tile->qntsty + compno;
 int ret; // global bandno
 
-comp->coord_o[0][0] = av_clip(tilex   * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[0][1] = av_clip((tilex + 1) * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[1][0] = av_clip(tiley   * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
-comp->coord_o[1][1] = av_clip((tiley + 1) * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[0][0] = av_clip(tilex   * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[1][0] = av_clip(tiley   * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
 
 comp->coord[0][0] = ff_jpeg2000_ceildivpow2(comp->coord_o[0][0], 
s->reduction_factor);
 comp->coord[0][1] = ff_jpeg2000_ceildivpow2(comp->coord_o[0][1], 
s->reduction_factor);

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


[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

2015-11-26 Thread Michael Niedermayer
ffmpeg | branch: release/2.8 | Michael Niedermayer  | 
Sun Nov 15 21:17:05 2015 +0100| [2dc1f3a02b1ef76a8614728a3ebbfc82be75dce1] | 
committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 65d3359fb366ea265a8468d76a111cb7352f0b55)

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000dec.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 2389dc1..214ff05 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -831,10 +831,10 @@ static int init_tile(Jpeg2000DecoderContext *s, int 
tileno)
 if (!tile->comp)
 return AVERROR(ENOMEM);
 
-tile->coord[0][0] = av_clip(tilex   * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-tile->coord[0][1] = av_clip((tilex + 1) * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-tile->coord[1][0] = av_clip(tiley   * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
-tile->coord[1][1] = av_clip((tiley + 1) * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+tile->coord[0][0] = av_clip(tilex   * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+tile->coord[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+tile->coord[1][0] = av_clip(tiley   * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+tile->coord[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
 
 for (compno = 0; compno < s->ncomponents; compno++) {
 Jpeg2000Component *comp = tile->comp + compno;

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


[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

2015-11-26 Thread Michael Niedermayer
ffmpeg | branch: release/2.5 | Michael Niedermayer  | 
Sun Nov 15 21:17:05 2015 +0100| [cd7598fb1bbacb3f1d95bd7e36d51cba3910e876] | 
committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 65d3359fb366ea265a8468d76a111cb7352f0b55)

Conflicts:

libavcodec/jpeg2000dec.c

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

 libavcodec/jpeg2000dec.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index f926ab8..ae0c9bb 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -690,10 +690,10 @@ static int init_tile(Jpeg2000DecoderContext *s, int 
tileno)
 Jpeg2000QuantStyle  *qntsty = tile->qntsty + compno;
 int ret; // global bandno
 
-comp->coord_o[0][0] = av_clip(tilex   * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[0][1] = av_clip((tilex + 1) * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[1][0] = av_clip(tiley   * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
-comp->coord_o[1][1] = av_clip((tiley + 1) * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[0][0] = av_clip(tilex   * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[1][0] = av_clip(tiley   * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
 
 comp->coord[0][0] = ff_jpeg2000_ceildivpow2(comp->coord_o[0][0], 
s->reduction_factor);
 comp->coord[0][1] = ff_jpeg2000_ceildivpow2(comp->coord_o[0][1], 
s->reduction_factor);

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


[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

2015-11-19 Thread Michael Niedermayer
ffmpeg | branch: release/2.6 | Michael Niedermayer  | 
Sun Nov 15 21:17:05 2015 +0100| [b7d98b2fe7f66b09c50fb7d59b0b5287845fca89] | 
committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 65d3359fb366ea265a8468d76a111cb7352f0b55)

Conflicts:

libavcodec/jpeg2000dec.c

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

 libavcodec/jpeg2000dec.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index bc5081d..66f126f 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -690,10 +690,10 @@ static int init_tile(Jpeg2000DecoderContext *s, int 
tileno)
 Jpeg2000QuantStyle  *qntsty = tile->qntsty + compno;
 int ret; // global bandno
 
-comp->coord_o[0][0] = av_clip(tilex   * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[0][1] = av_clip((tilex + 1) * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[1][0] = av_clip(tiley   * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
-comp->coord_o[1][1] = av_clip((tiley + 1) * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[0][0] = av_clip(tilex   * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[1][0] = av_clip(tiley   * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
 
 comp->coord[0][0] = ff_jpeg2000_ceildivpow2(comp->coord_o[0][0], 
s->reduction_factor);
 comp->coord[0][1] = ff_jpeg2000_ceildivpow2(comp->coord_o[0][1], 
s->reduction_factor);

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


[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

2015-11-18 Thread Michael Niedermayer
ffmpeg | branch: release/2.7 | Michael Niedermayer  | 
Sun Nov 15 21:17:05 2015 +0100| [ca43c6e1f53af217f6192332570d006e1c1f7079] | 
committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 65d3359fb366ea265a8468d76a111cb7352f0b55)

Conflicts:

libavcodec/jpeg2000dec.c

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

 libavcodec/jpeg2000dec.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 34591c3..caaf2f7 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -709,10 +709,10 @@ static int init_tile(Jpeg2000DecoderContext *s, int 
tileno)
 Jpeg2000QuantStyle  *qntsty = tile->qntsty + compno;
 int ret; // global bandno
 
-comp->coord_o[0][0] = av_clip(tilex   * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[0][1] = av_clip((tilex + 1) * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-comp->coord_o[1][0] = av_clip(tiley   * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
-comp->coord_o[1][1] = av_clip((tiley + 1) * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[0][0] = av_clip(tilex   * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+comp->coord_o[1][0] = av_clip(tiley   * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+comp->coord_o[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
 if (compno) {
 comp->coord_o[0][0] /= s->cdx[compno];
 comp->coord_o[0][1] /= s->cdx[compno];

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


[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

2015-11-15 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Nov 15 21:17:05 2015 +0100| [65d3359fb366ea265a8468d76a111cb7352f0b55] | 
committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions

Signed-off-by: Michael Niedermayer 

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

 libavcodec/jpeg2000dec.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 06cf4b7..4604e73 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -830,10 +830,10 @@ static int init_tile(Jpeg2000DecoderContext *s, int 
tileno)
 if (!tile->comp)
 return AVERROR(ENOMEM);
 
-tile->coord[0][0] = av_clip(tilex   * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-tile->coord[0][1] = av_clip((tilex + 1) * s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
-tile->coord[1][0] = av_clip(tiley   * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
-tile->coord[1][1] = av_clip((tiley + 1) * s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+tile->coord[0][0] = av_clip(tilex   * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+tile->coord[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width  + 
s->tile_offset_x, s->image_offset_x, s->width);
+tile->coord[1][0] = av_clip(tiley   * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
+tile->coord[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + 
s->tile_offset_y, s->image_offset_y, s->height);
 
 for (compno = 0; compno < s->ncomponents; compno++) {
 Jpeg2000Component *comp = tile->comp + compno;

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