Browse Source

PDF.js version 1.5.238 - See mozilla/pdf.js@dd828ea6f1e2935505bd513b6fdbcd6a7336cfc6

Pdf Bot 9 years ago
parent
commit
740beb3f41
5 changed files with 18 additions and 8 deletions
  1. 1 1
      bower.json
  2. 7 2
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 7 2
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.5.236",
+  "version": "1.5.238",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 7 - 2
build/pdf.combined.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.5.236';
-var pdfjsBuild = '5f59d07';
+var pdfjsVersion = '1.5.238';
+var pdfjsBuild = 'dd828ea';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
@@ -43852,6 +43852,11 @@ var XRef = (function XRefClosure() {
       // read stream objects for cache
       for (i = 0; i < n; ++i) {
         entries.push(parser.getObj());
+        // The ObjStm should not contain 'endobj'. If it's present, skip over it
+        // to support corrupt PDFs (fixes issue 5241, bug 898610, bug 1037816).
+        if (isCmd(parser.buf1, 'endobj')) {
+          parser.shift();
+        }
         num = nums[i];
         var entry = this.entries[num];
         if (entry && entry.offset === tableOffset && entry.gen === i) {

+ 2 - 2
build/pdf.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.5.236';
-var pdfjsBuild = '5f59d07';
+var pdfjsVersion = '1.5.238';
+var pdfjsBuild = 'dd828ea';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?

+ 7 - 2
build/pdf.worker.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.5.236';
-var pdfjsBuild = '5f59d07';
+var pdfjsVersion = '1.5.238';
+var pdfjsBuild = 'dd828ea';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
@@ -35510,6 +35510,11 @@ var XRef = (function XRefClosure() {
       // read stream objects for cache
       for (i = 0; i < n; ++i) {
         entries.push(parser.getObj());
+        // The ObjStm should not contain 'endobj'. If it's present, skip over it
+        // to support corrupt PDFs (fixes issue 5241, bug 898610, bug 1037816).
+        if (isCmd(parser.buf1, 'endobj')) {
+          parser.shift();
+        }
         num = nums[i];
         var entry = this.entries[num];
         if (entry && entry.offset === tableOffset && entry.gen === i) {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.5.236",
+  "version": "1.5.238",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [