Skip to content

Commit 6472d7a

Browse files
committed
fix: prevent hash concatenation from causing hash collisions
1 parent 6dce90b commit 6472d7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ function getTmpname (filename) {
3030
return filename + '.' +
3131
MurmurHash3(__filename)
3232
.hash(String(process.pid))
33+
.hash('\0')
3334
.hash(String(threadId))
35+
.hash('\0')
3436
.hash(String(++invocations))
3537
.result()
3638
}

0 commit comments

Comments
 (0)