Skip to content

Commit e2bb200

Browse files
Add validation for callout line in FreeText annotation
1 parent 8e40e4e commit e2bb200

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core/annotation.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3884,8 +3884,12 @@ class FreeTextAnnotation extends MarkupAnnotation {
38843884
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
38853885
if (dict.has("CL")) {
38863886
this.setLineEnding(dict.getArray("LE"));
3887-
this.data.calloutLine = dict.getArray("CL");
38883887
this.data.lineEnding = this.lineEnding;
3888+
3889+
const calloutLine = dict.getArray("CL");
3890+
if (isNumberArray(calloutLine)) {
3891+
this.data.calloutLine = calloutLine;
3892+
}
38893893
}
38903894
}
38913895

0 commit comments

Comments
 (0)