diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-03-19 18:56:22 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-03-19 18:56:22 +0100 |
commit | 0a072b57c521d763aa2f4d8918987a26c9ea5124 (patch) | |
tree | cb9b3241654dd8cbc7f83720d9d2aa236d842095 /lib/libalpm | |
parent | 0d69a4aeb077775288ada9cb418993f20a6060e3 (diff) | |
download | pacman-0a072b57c521d763aa2f4d8918987a26c9ea5124.tar.gz pacman-0a072b57c521d763aa2f4d8918987a26c9ea5124.tar.xz |
Removed an hardcoded string length
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/db.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 922aeaea..c555f256 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -159,7 +159,7 @@ pmpkg_t *db_scan(pmdb_t *db, char *target, unsigned int inforeq) if(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) { continue; } - strncpy(name, ent->d_name, 255); + strncpy(name, ent->d_name, PKG_NAME_LEN+PKG_VERSION_LEN-1); /* stat the entry, make sure it's a directory */ snprintf(path, PATH_MAX, "%s/%s", db->path, name); if(stat(path, &sbuf) || !S_ISDIR(sbuf.st_mode)) { |