aboutsummaryrefslogtreecommitdiff
path: root/helper/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'helper/hashtable.c')
-rw-r--r--helper/hashtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/helper/hashtable.c b/helper/hashtable.c
index 1121beb0..e0f562e5 100644
--- a/helper/hashtable.c
+++ b/helper/hashtable.c
@@ -92,7 +92,7 @@ odph_table_t odph_hash_table_create(const char *name, uint32_t capacity,
memset(tbl, 0, capacity << 20);
tbl->init_cap = capacity << 20;
- strncpy(tbl->name, name, ODPH_TABLE_NAME_LEN);
+ strncpy(tbl->name, name, ODPH_TABLE_NAME_LEN - 1);
tbl->key_size = key_size;
tbl->value_size = value_size;