replace strlcpy with strncpy

This commit is contained in:
Elad Salomons
2015-09-15 22:38:13 +03:00
parent b62f179e96
commit c23c846cd8

View File

@@ -65,7 +65,7 @@ int ENHashTableInsert(ENHashTable *ht, char *key, int data)
} }
len = strlen(key) + 1; len = strlen(key) + 1;
entry->key = calloc(len, sizeof(char)); entry->key = calloc(len, sizeof(char));
strlcpy(entry->key, key, len); strncpy(entry->key, key, len);
entry->data = data; entry->data = data;
entry->next = ht[i]; entry->next = ht[i];
ht[i] = entry; ht[i] = entry;