index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2008-03-28 23:58:33 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-03-28 18:32:04 -0500 |
commit | 3fe43ffa04efd9937205938ef74d9dbba1a7aa42 (patch) | |
tree | fd34e2bde926e7bee667bf9ae1efb068a4de419f /lib/libalpm | |
parent | 562442633a9dd8026d914d785f15de2d0a95fdef (diff) |
-rw-r--r-- | lib/libalpm/add.c | 4 |
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 8b06bef5..42015224 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -290,7 +290,7 @@ static int extract_single_file(struct archive *archive, struct archive_entry *entry, pmpkg_t *newpkg, pmpkg_t *oldpkg, pmtrans_t *trans, pmdb_t *db) { - const char *entryname; /* the name of the file in the archive */ + char entryname[PATH_MAX]; /* the name of the file in the archive */ mode_t entrymode; char filename[PATH_MAX]; /* the actual file we're extracting */ int needbackup = 0, notouch = 0; @@ -300,7 +300,7 @@ static int extract_single_file(struct archive *archive, ARCHIVE_EXTRACT_TIME; int errors = 0; - entryname = archive_entry_pathname(entry); + strncpy(entryname, archive_entry_pathname(entry), PATH_MAX); entrymode = archive_entry_mode(entry); memset(filename, 0, PATH_MAX); /* just to be sure */ |