summaryrefslogtreecommitdiff
path: root/src/cache.c
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-10-02 07:43:42 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2015-10-02 07:43:42 +0100
commitef5ae91676c8ada2a12ea72f889a54452dd94981 (patch)
tree0a962905ab9d0c2322f627928521a10c4cb5e20f /src/cache.c
parent9f9a63cecdc6ac4f449d3eacda6c591f0de9fbf3 (diff)
parent8845f3db20c951fcf1db3229a818cfd185f17f2e (diff)
downloadconntrack-tools-upstream.tar.gz
conntrack-tools-upstream.zip
Merge remote-tracking branch 'source/master' into upstreamupstream
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cache.c b/src/cache.c
index 7c41e54..79a024f 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -34,7 +34,7 @@ struct cache_feature *cache_feature[CACHE_MAX_FEATURE] = {
};
struct cache *cache_create(const char *name, enum cache_type type,
- unsigned int features,
+ unsigned int features,
struct cache_extra *extra,
struct cache_ops *ops)
{
@@ -53,7 +53,8 @@ struct cache *cache_create(const char *name, enum cache_type type,
return NULL;
memset(c, 0, sizeof(struct cache));
- strcpy(c->name, name);
+ strncpy(c->name, name, CACHE_MAX_NAMELEN);
+ c->name[CACHE_MAX_NAMELEN - 1] = '\0';
c->type = type;
for (i = 0; i < CACHE_MAX_FEATURE; i++) {