shithub: jbig2

Download patch

ref: 0fca4c1dc7ebd8686021ce5785400a2d33dee35d
parent: 39a82096258bf6b106e9dedb3309633e523c7b43
author: Sebastian Rasmussen <sebras@gmail.com>
date: Thu Feb 7 23:03:40 EST 2019

Make sure to indicate error upon unexpected OOB.

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -178,7 +178,7 @@
                     goto cleanup1;
                 }
                 if (err > 0) {
-                    jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "OOB decoding huffman code");
+                    code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "OOB decoding huffman code");
                     goto cleanup1;
                 }
             }
@@ -324,7 +324,7 @@
                 goto cleanup2;
             }
             if (code > 0) {
-                jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "OOB obtained when decoding symbol instance T coordinate");
+                code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "OOB obtained when decoding symbol instance T coordinate");
                 goto cleanup2;
             }
             T = STRIPT + CURT;