diff options
author | Vitaly Lavrov <vel21ripn@gmail.com> | 2021-06-10 09:06:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 11:06:19 +0200 |
commit | 6704649a75a748574f031ba8f110dd6cfa4fbb06 (patch) | |
tree | ff8fbd38bd3cc863e00cb8327e1c01c82d116dfd | |
parent | 1a8ae710cfb7ec395057e926090c900552ceb623 (diff) |
Bug in ndpi_lru_find_cache (#1204)
Key value check is missing.
-rw-r--r-- | src/lib/ndpi_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 2652917e3..d4940868c 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -7035,7 +7035,7 @@ u_int8_t ndpi_lru_find_cache(struct ndpi_lru_cache *c, u_int32_t key, u_int16_t *value, u_int8_t clean_key_when_found) { u_int32_t slot = key % c->num_entries; - if(c->entries[slot].is_full) { + if(c->entries[slot].is_full && c->entries[slot].key == key) { *value = c->entries[slot].value; if(clean_key_when_found) c->entries[slot].is_full = 0; |