summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-26 11:26:09 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-26 11:26:09 +0000
commit7247543da37bea539149f3391a529e5a0739beff (patch)
tree85de29d1e31148a7287c449b91ad768e0a0d31b9 /src
parent37a8d2acc1945010fc4b76255003d1f9e9edefa8 (diff)
[trunk] Import patch from sumatrapdf team. This handle testcase 1888.pdf.asan.35.988
Update issue 225
Diffstat (limited to 'src')
-rw-r--r--src/lib/openjp2/tcd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c
index fc77b5e4..cba1e245 100644
--- a/src/lib/openjp2/tcd.c
+++ b/src/lib/openjp2/tcd.c
@@ -663,6 +663,11 @@ OPJ_BOOL FUNCTION ( opj_tcd_t *p_tcd, \
l_tile->y0 = opj_int_max(l_cp->ty0 + q * l_cp->tdy, l_image->y0); \
l_tile->x1 = opj_int_min(l_cp->tx0 + (p + 1) * l_cp->tdx, l_image->x1); \
l_tile->y1 = opj_int_min(l_cp->ty0 + (q + 1) * l_cp->tdy, l_image->y1); \
+ /* testcase 1888.pdf.asan.35.988 */ \
+ if (l_tccp->numresolutions == 0) { \
+ fprintf(stderr, "tiles require at least one resolution\n"); \
+ return OPJ_FALSE; \
+ } \
/*fprintf(stderr, "Tile border = %d,%d,%d,%d\n", l_tile->x0, l_tile->y0,l_tile->x1,l_tile->y1);*/ \
\
/*tile->numcomps = image->numcomps; */ \