shithub: jbig2

Download patch

ref: 828dd5189c28650ab41c2c8d4a8ec1828370a186
parent: 7255c1f6d188e193912c9fde06603f188ccc2c0a
author: Sebastian Rasmussen <[email protected]>
date: Fri Jul 13 09:00:06 EDT 2018

jbig2dec: Error message in MMR coded data mixed black/white pixel runs.

--- a/jbig2_mmr.c
+++ b/jbig2_mmr.c
@@ -885,7 +885,7 @@
                 if (a2 > mmr->width)
                     a2 = mmr->width;
                 if (a1 == MINUS1 || a2 < a1)
-                    return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white H run");
+                    return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative black H run");
                 if (a1 < mmr->width)
                     jbig2_set_bits(dst, a1, a2);
                 a0 = a2;
@@ -904,7 +904,7 @@
                 if (a2 > mmr->width)
                     a2 = mmr->width;
                 if (a0 == MINUS1 || a1 < a0)
-                    return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative black H run");
+                    return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white H run");
                 if (a0 < mmr->width)
                     jbig2_set_bits(dst, a0, a1);
                 a0 = a2;