index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2008-01-11 00:01:58 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-11 00:01:58 -0600 |
commit | ccc1c731529de16f6fa4064fd992a8f63d7cfc26 (patch) | |
tree | dc5b96634cb255cfcbee1e57079d32491db9fc5e /lib/libalpm/server.c | |
parent | 0a65de10b1cd8bd450e47e735cb909eec13822d0 (diff) |
-rw-r--r-- | lib/libalpm/server.c | 5 |
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index 4bccf3ca..c0622552 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -188,7 +188,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath, char realfile[PATH_MAX]; char output[PATH_MAX]; char *fn = (char *)lp->data; - char pkgname[PKG_NAME_LEN]; + char *pkgname; fileurl = url_for_file(server, fn); if(!fileurl) { @@ -196,7 +196,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath, } /* pass the raw filename for passing to the callback function */ - strncpy(pkgname, fn, PKG_NAME_LEN); + STRDUP(pkgname, fn, (void)0); _alpm_log(PM_LOG_DEBUG, "using '%s' for download progress\n", pkgname); snprintf(realfile, PATH_MAX, "%s%s", localpath, fn); @@ -403,6 +403,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath, } chdir(cwd); } + FREE(pkgname); } if(alpm_list_count(complete) == alpm_list_count(files)) { |