Fix infloop in hashtab_remove/insert.

This only occurs when elements are removed, but that is currently not
used in libclamav (except for a new bytecode API).
This commit is contained in:
Török Edvin
2010-08-10 15:59:57 +03:00
parent fae973a25b
commit 67cbb218bc

View File

@@ -329,6 +329,7 @@ const struct cli_element* cli_hashtab_insert(struct cli_hashtable *s, const char
}
else if(element->key == DELETED_KEY) {
deleted_element = element;
element->key = NULL;
}
else if(len == element->len && strncmp(key, element->key, len)==0) {
PROFILE_DATA_UPDATE(s, tries);