diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-06 02:23:55 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-06 02:28:15 +0800 |
commit | d91d4273f38fb8a527ff342d360cee8aaf468896 (patch) | |
tree | 9561d62571289adf1058a3a848037905af56f6e0 | |
parent | b5a27404ff64c427d8bcdbd16742ab15a4f6cda5 (diff) | |
download | ghostpdl-d91d4273f38fb8a527ff342d360cee8aaf468896.tar.gz |
Allow for symbol dictionary with 0 symbols.
-rw-r--r-- | jbig2dec/jbig2_symbol_dict.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jbig2dec/jbig2_symbol_dict.c b/jbig2dec/jbig2_symbol_dict.c index 672425d98..164294d62 100644 --- a/jbig2dec/jbig2_symbol_dict.c +++ b/jbig2dec/jbig2_symbol_dict.c @@ -103,7 +103,7 @@ jbig2_sd_new(Jbig2Ctx *ctx, uint32_t n_symbols) 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; |