1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #3931 from yurydelendik/bug900822

Allocates bigger hashData buffer
This commit is contained in:
Brendan Dahl 2013-11-18 13:09:40 -08:00
commit ff64b50582
4 changed files with 9 additions and 1 deletions

View file

@ -449,7 +449,8 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
function prepareKeyData(fileId, password, ownerPassword, userPassword,
flags, revision, keyLength, encryptMetadata) {
var hashData = new Uint8Array(100), i = 0, j, n;
var hashDataSize = 40 + ownerPassword.length + fileId.length;
var hashData = new Uint8Array(hashDataSize), i = 0, j, n;
if (password) {
n = Math.min(32, password.length);
for (; i < n; ++i)