[FFmpeg-trac] #7931(avcodec:open): exr conversion fails
FFmpeg
trac at avcodec.org
Fri May 31 20:31:15 EEST 2019
#7931: exr conversion fails
-------------------------------------+-----------------------------------
Reporter: p0las | Owner:
Type: enhancement | Status: open
Priority: wish | Component: avcodec
Version: git-master | Resolution:
Keywords: exr | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Changes (by cehoyos):
* status: new => open
* reproduced: 0 => 1
* component: undetermined => avcodec
* priority: normal => wish
* version: 4.1 => git-master
* keywords: => exr
* type: defect => enhancement
Comment:
The following does not fix decoding:
{{{
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 0f8b0fda9f..9f7a068028 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -134,8 +134,8 @@ typedef struct EXRContext {
const AVPixFmtDescriptor *desc;
int w, h;
- uint32_t xmax, xmin;
- uint32_t ymax, ymin;
+ int32_t xmax, xmin;
+ int32_t ymax, ymin;
uint32_t xdelta, ydelta;
int scan_lines_per_block;
@@ -1735,8 +1735,8 @@ static int decode_frame(AVCodecContext *avctx, void
*data,
if (s->xmin > s->xmax ||
s->ymin > s->ymax ||
s->xdelta != s->xmax - s->xmin + 1 ||
- s->xmax >= s->w ||
- s->ymax >= s->h) {
+ s->xmax > s->w ||
+ s->ymax > s->h) {
av_log(avctx, AV_LOG_ERROR, "Wrong or missing size
information.\n");
return AVERROR_INVALIDDATA;
}
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7931#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list