summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-08-17 08:29:34 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-08-17 08:30:59 +0100
commit05efb77627aa0e05ab59ec1d6cb6988e1eb9710e (patch)
treea7537d3bf8f27324f09cf410ffd62243a713af3f
parent9f8ad8cff4ca7d6ce8b772b109b8aa77a84ba97a (diff)
downloadghostpdl-05efb77627aa0e05ab59ec1d6cb6988e1eb9710e.tar.gz
oss-fuzz 50306: Add bounds check in Type 2 charstring interpreter
Missing stack bounds check
-rw-r--r--base/gstype2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/base/gstype2.c b/base/gstype2.c
index 35b7f3f2b..2e7a4ce7e 100644
--- a/base/gstype2.c
+++ b/base/gstype2.c
@@ -690,6 +690,8 @@ gs_type2_interpret(gs_type1_state * pcis, const gs_glyph_data_t *pgd,
csp -= 3;
break;
case ce2_neg:
+ if (!CS_CHECK_CSTACK_BOUNDS(csp, cstack))
+ return_error(gs_error_invalidfont);
*csp = -*csp;
break;
case ce2_eq: