shithub: jbig2

Download patch

ref: f2bc4c485865c7e63c38c95fbe6993ecfa85905c
parent: ab05baa2b12b5ddb46dc33799e80fd57b2e21f00
author: Sebastian Rasmussen <sebras@gmail.com>
date: Sun Jul 1 13:26:37 EDT 2018

jbig2dec: Ignore extension segments that are not marked necessary.

Previously this was a fatal error, but it is better as a warning as
the extension segment has not been marked necessary as outlined in
the specification.

--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -234,7 +234,7 @@
         if (necessary) {
             return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "unhandled necessary extension segment type 0x%08x", type);
         } else {
-            return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unhandled extension segment");
+            jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unhandled non-necessary extension segment, skipping");
         }
     }