diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2014-08-21 18:39:30 +0200 |
---|---|---|
committer | Rainer Hochecker <fernetmenta@online.de> | 2014-08-21 18:39:30 +0200 |
commit | 8ce4f466f87ed4e05bb59a4bd47b19f3d8b8b9e1 (patch) | |
tree | 6e4d3cad0aef9a7c2be3125e803190ad447deb72 /lib | |
parent | 05cee4b2cb358b016c5d16b006bc6c89e3245acd (diff) |
cximage: fix broken cr2 after wrong backport of security fix d13aee8e81be9032ed78fd707d485fdcb4ed5bd6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cximage-6.0/raw/libdcr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cximage-6.0/raw/libdcr.c b/lib/cximage-6.0/raw/libdcr.c index e441afb742..7e357f2ed7 100644 --- a/lib/cximage-6.0/raw/libdcr.c +++ b/lib/cximage-6.0/raw/libdcr.c @@ -920,6 +920,8 @@ void DCR_CLASS dcr_lossless_jpeg_load_raw(DCRAW* p) } if (p->raw_width == 3984 && (col -= 2) < 0) col += (row--,p->raw_width); + if (row > p->raw_height) + longjmp (p->failure, 3); if ((unsigned) (row-p->top_margin) < p->height) { if ((unsigned) (col-p->left_margin) < p->width) { BAYER(row-p->top_margin,col-p->left_margin) = val; @@ -929,8 +931,6 @@ void DCR_CLASS dcr_lossless_jpeg_load_raw(DCRAW* p) } if (++col >= p->raw_width) col = (row++,0); - if (row >= p->raw_height) - longjmp (p->failure, 3); } } free (jh.row); |