diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-02-26 11:08:25 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-02-26 11:08:25 +0000 |
| commit | 241769dc2fac48b9ba6527fe62d536998dda4fa3 (patch) | |
| tree | 6e57be5a5bf3789b5a5ea5478803d862e9e4fd9d /src/lib | |
| parent | 4a39ee9bbc20411c7d5de3ee1c9844e94a42be3d (diff) | |
[trunk] Import patch from sumatrapdf team. This handle testcase 4035.pdf.SIGSEGV.d8b.3375
Update issue 225
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/openjp2/j2k.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index d6b7d6a6..52cf06c5 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -1954,6 +1954,12 @@ static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k, return OPJ_FALSE; } + /* testcase 4035.pdf.SIGSEGV.d8b.3375 */ + if (l_image->x0 > l_image->x1 || l_image->y0 > l_image->y1) { + opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker: negative image size (%d x %d)\n", l_image->x1 - l_image->x0, l_image->y1 - l_image->y0); + return OPJ_FALSE; + } + #ifdef USE_JPWL if (l_cp->correct) { /* if JPWL is on, we check whether TX errors have damaged |
