From 22c0037a082dc2ca31b64e41a65fd5ef939ea541 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 16 Mar 2005 20:23:50 +0000 Subject: Added DB_TREENAME_LEN define to avoid hardcoded length for database string --- lib/libalpm/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/db.c') diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 3b962d96..760a2fde 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -53,7 +53,7 @@ pmdb_t *db_open(char *root, char *dbpath, char *treename) return(NULL); } - strncpy(db->treename, treename, sizeof(db->treename)-1); + strncpy(db->treename, treename, DB_TREENAME_LEN-1); db->pkgcache = NULL; db->grpcache = NULL; -- cgit v1.2.3-70-g09d2