Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1f232de

Browse files
committedAug 23, 2013
Stops objects indexing at the end
1 parent 8fc1e66 commit 1f232de

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed
 

‎.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pdf -crlf

‎src/core/obj.js

+3
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,9 @@ var XRef = (function XRefClosure() {
758758
if (ch === 37) { // %-comment
759759
do {
760760
++position;
761+
if (position >= length) {
762+
break;
763+
}
761764
ch = buffer[position];
762765
} while (ch !== 13 && ch !== 10);
763766
continue;

‎test/pdfs/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
!type4psfunc.pdf
3737
!issue1350.pdf
3838
!S2.pdf
39+
!helloworld-bad.pdf
3940
!zerowidthline.pdf
4041
!issue1002.pdf
4142
!issue925.pdf

‎test/pdfs/helloworld-bad.pdf

745 Bytes
Binary file not shown.

‎test/test_manifest.json

+6
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,12 @@
897897
"link": true,
898898
"type": "eq"
899899
},
900+
{ "id": "helloworld-bad",
901+
"file": "pdfs/helloworld-bad.pdf",
902+
"md5": "bf5ab1cf7fe3a502c3754f55e6ceeabd",
903+
"rounds": 1,
904+
"type": "load"
905+
},
900906
{ "id": "issue818",
901907
"file": "pdfs/issue818.pdf",
902908
"md5": "dd2f8a5bd65164ad74da2b45a6ca90cc",

0 commit comments

Comments
 (0)
Please sign in to comment.