ref: 1820a7e88e9f3b67bc53026be3853c715c11a911
parent: 301726dd5c9c60c1e54eb0965c1d45b36350ce2e
author: Sebastian Rasmussen <[email protected]>
date: Sat Aug 5 22:23:55 EDT 2017
Allow for symbol dictionary with 0 symbols.
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -103,7 +103,7 @@
if (new_dict->glyphs != NULL) {
memset(new_dict->glyphs, 0, n_symbols * sizeof(Jbig2Image *));
- } else {
+ } else if (new_dict->n_symbols > 0) {
jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "unable to allocate glyphs for new empty symbol dict");
jbig2_free(ctx->allocator, new_dict);
return NULL;