diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-12-07 18:12:23 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2019-02-09 01:27:44 +0100 |
commit | 6238141c4564df091515fac92e3c35275d5ce26f (patch) | |
tree | 6f7f94cc95b5b0b5a60d23443ca1f5e1c9819ef5 /jbig2dec/jbig2_text.c | |
parent | a0421f035fd418d27fd2df80b896d97d3d6e87ea (diff) | |
download | ghostpdl-6238141c4564df091515fac92e3c35275d5ce26f.tar.gz |
Bug 700384: Indicate error upon error, do not just warn.
Building a Huffman table failed, this was correctly detected,
but success was indicated to the caller causing a reference
template to be left uninitialized, which later on caused the
generic refinement region decoder attempt to use this
uninitialized data. This was reported by MSAN.
Thanks to oss-fuzz for reporting.
Diffstat (limited to 'jbig2dec/jbig2_text.c')
-rw-r--r-- | jbig2dec/jbig2_text.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jbig2dec/jbig2_text.c b/jbig2dec/jbig2_text.c index 910ad981d..e080777f8 100644 --- a/jbig2dec/jbig2_text.c +++ b/jbig2dec/jbig2_text.c @@ -219,9 +219,9 @@ cleanup1: jbig2_release_huffman_table(ctx, runcodes); if (SBSYMCODES == NULL) { - jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to construct symbol ID huffman table"); + code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to construct symbol ID huffman table"); jbig2_huffman_free(ctx, hs); - return ((code != 0) ? code : -1); + return code; } } |