Check key length, if index keys are fixed length
This commit is contained in:
parent
8db89f6336
commit
08bed1acb7
@ -379,8 +379,9 @@ AttributeIndex::InternalGetIterator()
|
||||
AbstractIndexIterator*
|
||||
AttributeIndex::InternalFind(const void* key, size_t length)
|
||||
{
|
||||
if (key == NULL)
|
||||
if (HasFixedKeyLength() && length != KeyLength())
|
||||
return NULL;
|
||||
|
||||
Iterator* iterator = new(std::nothrow) Iterator;
|
||||
if (iterator != NULL) {
|
||||
if (!iterator->SetTo(this, TreeKey(key, length))) {
|
||||
|
Loading…
Reference in New Issue
Block a user