summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-12-08 11:48:11 +0000
committerRobin Watts <robin.watts@artifex.com>2017-12-08 11:51:10 +0000
commit444e7524b62d553bd2e554428a290ece9b1de89c (patch)
tree6f4e8146441abd876ca75a0c027c46514d3dfc94 /source/pdf
parent61f466533fee60ef1cdb862ad955aa671e3f1025 (diff)
downloadmupdf-444e7524b62d553bd2e554428a290ece9b1de89c.tar.xz
Fix SEGV in redaction code due to TJ with no chars.
If the first TJ we meet in a file has an adjustment, but no chars, then we end up calling 'adjustment' without ever having set fontdesc. This causes a crash. Fix it here.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-op-filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/pdf/pdf-op-filter.c b/source/pdf/pdf-op-filter.c
index c3f64b3f..ef8aa8be 100644
--- a/source/pdf/pdf-op-filter.c
+++ b/source/pdf/pdf-op-filter.c
@@ -588,6 +588,7 @@ filter_show_text(fz_context *ctx, pdf_filter_processor *p, pdf_obj *text)
if (!pdf_is_array(ctx, text))
return;
+ p->tos.fontdesc = fontdesc;
n = pdf_array_len(ctx, text);
skip.x = skip.y = 0;
doc = pdf_get_bound_document(ctx, text);