ref: 36f5262823d30ea6d95b98d88f638d726be05114
parent: 0fca4c1dc7ebd8686021ce5785400a2d33dee35d
author: Sebastian Rasmussen <sebras@gmail.com>
date: Thu Feb 7 23:08:08 EST 2019
Without enough prefix codes, a Huffman table cannot be generated. Previously this was treated as a warning, possibly allowing access to uninitialized prefix code entries.
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -197,8 +197,10 @@
}
if (index < SBNUMSYMS) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "runlength codes do not cover the available symbol set");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "runlength codes do not cover the available symbol set");
+ goto cleanup1;
}
+
symcodeparams.HTOOB = 0;
symcodeparams.lines = symcodelengths;
symcodeparams.n_lines = SBNUMSYMS;