diff options
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch')
| -rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch new file mode 100644 index 0000000000..1caeb3ef51 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 3ebffb1d96ba0cacec23016eccb4047dab365853 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> | ||
| 3 | Date: Wed, 24 May 2017 19:29:57 +0100 | ||
| 4 | Subject: [PATCH] Bug 697934: Fix SEGV due to error code being ignored. | ||
| 5 | |||
| 6 | The return code from jbig2_decode_text_region was being ignored so the | ||
| 7 | code continued to try and parse the invalid file using incomplete/empty | ||
| 8 | structures. | ||
| 9 | |||
| 10 | Upstream-Status: Backport | ||
| 11 | CVE: CVE-2017-9216 | ||
| 12 | |||
| 13 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
| 14 | --- | ||
| 15 | jbig2dec/jbig2_symbol_dict.c | 4 +++- | ||
| 16 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/jbig2dec/jbig2_symbol_dict.c b/jbig2dec/jbig2_symbol_dict.c | ||
| 19 | index 3cc1731..672425d 100644 | ||
| 20 | --- a/jbig2dec/jbig2_symbol_dict.c | ||
| 21 | +++ b/jbig2dec/jbig2_symbol_dict.c | ||
| 22 | @@ -493,8 +493,10 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, | ||
| 23 | } | ||
| 24 | |||
| 25 | /* multiple symbols are handled as a text region */ | ||
| 26 | - jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts, | ||
| 27 | + code = jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts, | ||
| 28 | n_refagg_dicts, image, data, size, GR_stats, as, ws); | ||
| 29 | + if (code < 0) | ||
| 30 | + goto cleanup4; | ||
| 31 | |||
| 32 | SDNEWSYMS->glyphs[NSYMSDECODED] = image; | ||
| 33 | refagg_dicts[0]->glyphs[params->SDNUMINSYMS + NSYMSDECODED] = jbig2_image_clone(ctx, SDNEWSYMS->glyphs[NSYMSDECODED]); | ||
| 34 | -- | ||
| 35 | 2.10.2 | ||
| 36 | |||
