shithub: jbig2

Download patch

ref: c17e4d59c885cf7197bc62c8f9c82be277b81aa3
parent: 377f4d5732ac0fd81402b58f7d65a035904577cf
author: Sebastian Rasmussen <[email protected]>
date: Sun May 14 13:44:45 EDT 2017

Do not grow page if page height is known.

Previously an encountered region segment could cause the page
height to be increased if the segment height/position occurred
outside of the page boundaries. This happened regardless of
whether the page height was previously known or unknown.

--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -247,7 +247,7 @@
     }
 
     /* grow the page to accomodate a new stripe if necessary */
-    if (page->striped) {
+    if (page->striped && page->height == 0xFFFFFFFF) {
         uint32_t new_height = y + image->height + page->end_row;
 
         if (page->image->height < new_height) {