mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08: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)
|
||||
|
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -29,6 +29,7 @@
|
|||
!freeculture.pdf
|
||||
!pdfkit_compressed.pdf
|
||||
!TAMReview.pdf
|
||||
!bug900822.pdf
|
||||
!issue918.pdf
|
||||
!issue1905.pdf
|
||||
!issue2833.pdf
|
||||
|
|
BIN
test/pdfs/bug900822.pdf
Normal file
BIN
test/pdfs/bug900822.pdf
Normal file
Binary file not shown.
|
@ -1448,6 +1448,12 @@
|
|||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "bug900822",
|
||||
"file": "pdfs/bug900822.pdf",
|
||||
"md5": "70e2a3c5922574eeda169c955cf9d084",
|
||||
"rounds": 1,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "issue2853",
|
||||
"file": "pdfs/issue2853.pdf",
|
||||
"md5": "9f0ad95ef0b243ee8813c4eca0f7a042",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue