Merge pull request #3882 from yurydelendik/issue3438

Ignoring glyphs without points
This commit is contained in:
Tim van der Meij 2013-11-08 14:21:17 -08:00
commit 6be8a2bd83
4 changed files with 11 additions and 0 deletions

View File

@ -3175,6 +3175,10 @@ var Font = (function FontClosure() {
coordinatesLength += repeat * xyLength;
}
}
// glyph without coordinates will be rejected
if (coordinatesLength === 0) {
return 0;
}
var glyphDataLength = j + coordinatesLength;
if (glyphDataLength > glyf.length) {
// not enough data for coordinates

View File

@ -21,6 +21,7 @@
!devicen.pdf
!cmykjpeg.pdf
!issue840.pdf
!issue3438.pdf
!issue2074.pdf
!scan-bad.pdf
!bug860632.pdf

BIN
test/pdfs/issue3438.pdf Normal file

Binary file not shown.

View File

@ -1304,6 +1304,12 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue3438",
"file": "pdfs/issue3438.pdf",
"md5": "5aa3340b0920b65a377f697587668f89",
"rounds": 1,
"type": "eq"
},
{ "id": "bug886717",
"file": "pdfs/bug886717.pdf",
"md5": "8ba614192797a1324765610231a1bc9d",