[Pkg-javascript-commits] [pdf.js] 06/72: Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 20:15:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 3651c9e1f7e242242d8119295eb1d10d5d94f833
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Sat Feb 14 00:08:43 2015 +0100

    Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)
---
 src/core/jpg.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/core/jpg.js b/src/core/jpg.js
index 91302e2..ffa6462 100644
--- a/src/core/jpg.js
+++ b/src/core/jpg.js
@@ -792,6 +792,13 @@ var JpegImage = (function jpegImage() {
               successiveApproximation >> 4, successiveApproximation & 15);
             offset += processed;
             break;
+
+          case 0xFFFF: // Fill bytes
+            if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.
+              offset--;
+            }
+            break;
+
           default:
             if (data[offset - 3] === 0xFF &&
                 data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list