mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-02 19:25:52 +08:00
Fix UBSAN report
/home/anoyes/workspace/foundationdb/fdbserver/VersionedBTree.actor.cpp:1606:10: runtime error: null pointer passed as argument 2, which is declared to never be null
This commit is contained in:
parent
9ef1f4da5c
commit
560c1da805
@ -1603,7 +1603,9 @@ private:
|
||||
void setMetaKey(StringRef key) {
|
||||
ASSERT(key.size() < (smallestPhysicalBlock - sizeof(Header)));
|
||||
metaKeySize = key.size();
|
||||
memcpy(this + 1, key.begin(), key.size());
|
||||
if (key.size() > 0) {
|
||||
memcpy(this + 1, key.begin(), key.size());
|
||||
}
|
||||
}
|
||||
|
||||
int size() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user