summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index 09d508a8..34f3d07c 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -28,6 +28,7 @@
#include <sys/stat.h>
/* pacman */
#include "list.h"
+#include "util.h"
#include "package.h"
#include "group.h"
#include "db.h"
@@ -125,7 +126,7 @@ int db_load_grpcache(pmdb_t *db)
if(!pm_list_is_strin(i->data, db->grpcache)) {
pmgrp_t *grp = grp_new();
- strncpy(grp->name, (char *)i->data, 256);
+ STRNCPY(grp->name, (char *)i->data, GRP_NAME_LEN);
grp->packages = pm_list_add_sorted(grp->packages, pkg->name, grp_cmp);
db->grpcache = pm_list_add_sorted(db->grpcache, grp, grp_cmp);
} else {