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:
commit
ff64b50582
4 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue