commit | d78fd46cbbd290e6c0a11c89ca8c4c0d8dc555e2 | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Wed Jun 02 21:29:20 2021 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Thu Jun 03 07:52:59 2021 +0200 |
tree | 344795bd210e056d6ea6a36ac1f0ce4279d6d590 | |
parent | e87c7dc8ce0e023c07db4236f2941f65f13f075c [diff] [blame] |
hash tables BUGFIX cast explicitely to minimize possibility of integer overflow
diff --git a/src/hash_table.c b/src/hash_table.c index 3624e1d..c74ced7 100644 --- a/src/hash_table.c +++ b/src/hash_table.c
@@ -372,7 +372,7 @@ return NULL; } - memcpy(ht->recs, orig->recs, orig->used * orig->rec_size); + memcpy(ht->recs, orig->recs, (size_t)orig->used * (size_t)orig->rec_size); ht->used = orig->used; ht->invalid = orig->invalid; return ht;