Allocates bigger hashData buffer
This commit is contained in:
parent
c320a0c2a5
commit
2b63cd7e62
@ -449,7 +449,8 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
|||||||
|
|
||||||
function prepareKeyData(fileId, password, ownerPassword, userPassword,
|
function prepareKeyData(fileId, password, ownerPassword, userPassword,
|
||||||
flags, revision, keyLength, encryptMetadata) {
|
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) {
|
if (password) {
|
||||||
n = Math.min(32, password.length);
|
n = Math.min(32, password.length);
|
||||||
for (; i < n; ++i)
|
for (; i < n; ++i)
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -29,6 +29,7 @@
|
|||||||
!freeculture.pdf
|
!freeculture.pdf
|
||||||
!pdfkit_compressed.pdf
|
!pdfkit_compressed.pdf
|
||||||
!TAMReview.pdf
|
!TAMReview.pdf
|
||||||
|
!bug900822.pdf
|
||||||
!issue918.pdf
|
!issue918.pdf
|
||||||
!issue1905.pdf
|
!issue1905.pdf
|
||||||
!issue2833.pdf
|
!issue2833.pdf
|
||||||
|
BIN
test/pdfs/bug900822.pdf
Normal file
BIN
test/pdfs/bug900822.pdf
Normal file
Binary file not shown.
@ -1439,6 +1439,12 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "bug900822",
|
||||||
|
"file": "pdfs/bug900822.pdf",
|
||||||
|
"md5": "70e2a3c5922574eeda169c955cf9d084",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "load"
|
||||||
|
},
|
||||||
{ "id": "issue2853",
|
{ "id": "issue2853",
|
||||||
"file": "pdfs/issue2853.pdf",
|
"file": "pdfs/issue2853.pdf",
|
||||||
"md5": "9f0ad95ef0b243ee8813c4eca0f7a042",
|
"md5": "9f0ad95ef0b243ee8813c4eca0f7a042",
|
||||||
|
Loading…
Reference in New Issue
Block a user