ref: 912c14dd09d94a6bade4677c485b525a7679fb04
parent: 1f773152929142b68d41d97950fa54c355a3e2dc
author: Sebastian Rasmussen <[email protected]>
date: Wed May 23 23:20:52 EDT 2018
jbig2dec: Detected errors should be fatal, not warnings.
--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -687,7 +687,7 @@
return jbig2_decode_generic_template3_TPGDON(ctx, segment, params, as, image, GB_stats);
}
- return -1;
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "unsupported GBTEMPLATE (%d)", params->GBTEMPLATE);
}
/**
@@ -746,7 +746,8 @@
for (i = 0; i < 8; i++)
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, "gbat[%d] = %d", i, params->gbat[i]);
}
- return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "decode_generic_region: MMR=%d, GBTEMPLATE=%d NYI", params->MMR, params->GBTEMPLATE);
+
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "decode_generic_region: MMR=%d TPGDON=%d GBTEMPLATE=%d", params->MMR, params->TPGDON, params->GBTEMPLATE);
}
/**
--- a/jbig2_metadata.c
+++ b/jbig2_metadata.c
@@ -108,7 +108,7 @@
md->keys[md->entries] = jbig2_strndup(ctx, key, key_length);
md->values[md->entries] = jbig2_strndup(ctx, value, value_length);
if (md->keys[md->entries] == NULL || md->values[md->entries] == NULL) {
- return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "unable to accommodate more metadata");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "unable to accommodate more metadata");
}
md->entries++;