[Pkg-javascript-commits] [pdf.js] 08/207: Prevent adding undefined array entries to CMap.map in mapRangeToArray (issue 4875)
David Prévot
taffit at moszumanska.debian.org
Mon Jul 28 15:36:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit d1c71ab7adfbf2536584eb67f655f5e7287cf601
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Mon Jun 2 14:29:54 2014 +0200
Prevent adding undefined array entries to CMap.map in mapRangeToArray (issue 4875)
---
src/core/cmap.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/cmap.js b/src/core/cmap.js
index f195290..792c679 100644
--- a/src/core/cmap.js
+++ b/src/core/cmap.js
@@ -222,8 +222,8 @@ var CMap = (function CMapClosure() {
},
mapRangeToArray: function(low, high, array) {
- var i = 0;
- while (low <= high) {
+ var i = 0, ii = array.length;
+ while (low <= high && i < ii) {
this.map[low] = array[i++];
++low;
}
--
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