From e2bb200d0008d93a68d4d65b0bfb4b8a6773c6be Mon Sep 17 00:00:00 2001 From: Edoardo Cavazza Date: Mon, 27 Jan 2025 09:03:49 +0100 Subject: [PATCH] Add validation for callout line in FreeText annotation --- src/core/annotation.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/annotation.js b/src/core/annotation.js index fec27fdd6..f6007c5cc 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -3884,8 +3884,12 @@ class FreeTextAnnotation extends MarkupAnnotation { if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) { if (dict.has("CL")) { this.setLineEnding(dict.getArray("LE")); - this.data.calloutLine = dict.getArray("CL"); this.data.lineEnding = this.lineEnding; + + const calloutLine = dict.getArray("CL"); + if (isNumberArray(calloutLine)) { + this.data.calloutLine = calloutLine; + } } }