summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-03-30 20:42:24 +0200
committerDan McGee <dan@archlinux.org>2008-03-30 20:42:24 +0200
commit0d1263af260d9bb7c4aeb29d1637da5fdc1a949e (patch)
treedd208e1a8d9b3773f92c82921533d7498a5e5510 /lib/libalpm/add.c
parent41c1295559bf4764c6b710cd14d300758c41a19a (diff)
parentd9b9e60d7d4943ec0395a66bd40d22089cfbee35 (diff)
downloadpacman-0d1263af260d9bb7c4aeb29d1637da5fdc1a949e.tar.gz
pacman-0d1263af260d9bb7c4aeb29d1637da5fdc1a949e.tar.xz
Merge branch 'maint'
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 0c3d7735..619ce5e6 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -276,7 +276,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;
@@ -286,7 +286,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 */