projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disallow nullptr literal in StringPiece constructor
[folly.git]
/
folly
/
SpookyHashV2.cpp
diff --git
a/folly/SpookyHashV2.cpp
b/folly/SpookyHashV2.cpp
index e6113a39848e5aeb71506d914a953c190fdda3ab..e2f665f2259dd6d830361a0e4511b6928bbdaa57 100644
(file)
--- a/
folly/SpookyHashV2.cpp
+++ b/
folly/SpookyHashV2.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
4
Facebook, Inc.
+ * Copyright 201
5
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-323,7
+323,7
@@
void SpookyHashV2::Update(const void *message, size_t length)
// report the hash for the concatenation of all message fragments so far
// report the hash for the concatenation of all message fragments so far
-void SpookyHashV2::Final(uint64_t *hash1, uint64_t *hash2)
+void SpookyHashV2::Final(uint64_t *hash1, uint64_t *hash2)
const
{
// init the variables
if (m_length < sc_bufSize)
{
// init the variables
if (m_length < sc_bufSize)
@@
-334,7
+334,9
@@
void SpookyHashV2::Final(uint64_t *hash1, uint64_t *hash2)
return;
}
return;
}
- const uint64_t *data = (const uint64_t *)m_data;
+ uint64_t buf[2*sc_numVars];
+ memcpy(buf, m_data, sizeof(buf));
+ uint64_t *data = buf;
uint8_t remainder = m_remainder;
uint64_t h0 = m_state[0];
uint8_t remainder = m_remainder;
uint64_t h0 = m_state[0];