Skip to content

Commit

Permalink
Merge pull request #12534 from Snuffleupagus/murmurhash-slice
Browse files Browse the repository at this point in the history
Ensure that `MurmurHash3_64.update` handles `ArrayBuffer` input correctly, to avoid hash-collisions (issue 12533)
  • Loading branch information
timvandermeij authored Oct 26, 2020
2 parents b27e4fa + f2fa053 commit 71a14be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/murmurhash3.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MurmurHash3_64 {
}
}
} else if (isArrayBuffer(input)) {
data = input;
data = input.slice();
length = data.byteLength;
} else {
throw new Error(
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/issue12533.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://web.archive.org/web/20201026152003/https://www.mass.gov/doc/covid-19-dashboard-october-25-2020/download
9 changes: 9 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2898,6 +2898,15 @@
"link": false,
"type": "eq"
},
{ "id": "issue12533",
"file": "pdfs/issue12533.pdf",
"md5": "9824904320f884eee20d4e4573008e6f",
"rounds": 1,
"link": true,
"firstPage": 17,
"lastPage": 18,
"type": "eq"
},
{ "id": "issue1466",
"file": "pdfs/issue1466.pdf",
"md5": "8a8877432e5bb10cfd50d60488d947bb",
Expand Down

0 comments on commit 71a14be

Please sign in to comment.