diff options
author | pdw <> | 2005-10-26 20:27:50 +0000 |
---|---|---|
committer | pdw <> | 2005-10-26 20:27:50 +0000 |
commit | 3f2d5210c9461a6590e792ed2e36cb4f5b48aa90 (patch) | |
tree | ed48189a464c3e6ed44675e820c3c7d7b1650904 | |
parent | 98ffcb529342f59c09a3f0765c198eaf54856c18 (diff) | |
download | iftop-3f2d5210c9461a6590e792ed2e36cb4f5b48aa90.zip |
Fix for problem found by Ken McLeod <thecloud@apple.com>
hash function return value not constrained.
-rw-r--r-- | serv_hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serv_hash.c b/serv_hash.c index f32e4e9..279032e 100644 --- a/serv_hash.c +++ b/serv_hash.c @@ -19,7 +19,7 @@ int serv_hash_compare(void* a, void* b) { int serv_hash_hash(void* key) { ip_service* serv = (ip_service*)key; - return serv->protocol; + return serv->protocol % hash_table_size; } void* serv_hash_copy_key(void* orig) { |