shithub: jbig2

Download patch

ref: 438be64652d4921ce6ef38b204ab3a8e993ea052
parent: bef709de120ba435539c4cf7233aa7ec67b9d15a
author: Sebastian Rasmussen <sebras@gmail.com>
date: Wed May 23 23:24:33 EDT 2018

jbig2dec: Refinement bitmaps without images should be treated as fatal errors.

--- a/jbig2_refinement.c
+++ b/jbig2_refinement.c
@@ -446,6 +446,8 @@
         ref = jbig2_region_find_referred(ctx, segment);
         if (ref == NULL)
             return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "could not find reference bitmap");
+        if (ref->result == NULL)
+            return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "reference bitmap has no decoded image");
         /* the reference bitmap is the result of a previous
            intermediate region segment; the reference selection
            rules say to use the first one available, and not to