summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-07 10:00:20 -0600
committerDan McGee <dan@archlinux.org>2011-12-07 10:00:20 -0600
commita3a75e0a41680283572895165da3fe2505314dec (patch)
tree2ac99252adb34215ef7401acf517c45e3bcea2c1 /lib/libalpm
parent1038e669649dae98c1cf9c354e680c62cf25638c (diff)
parent6a1d3948a670184f01a697efe55b91b4ccdcb51d (diff)
downloadpacman-a3a75e0a41680283572895165da3fe2505314dec.tar.xz
Merge branch 'maint'
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c3
-rw-r--r--lib/libalpm/util.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 76bb00f9..bcbc8095 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -602,6 +602,9 @@ char SYMEXPORT *alpm_fetch_pkgurl(alpm_handle_t *handle, const char *url)
payload.force = 1;
payload.errors_ok = (handle->siglevel & ALPM_SIG_PACKAGE_OPTIONAL);
+ /* set hard upper limit of 16KiB */
+ payload.max_size = 16 * 1024;
+
ret = _alpm_download(&payload, cachedir, &sig_final_file);
if(ret == -1 && !payload.errors_ok) {
_alpm_log(handle, ALPM_LOG_WARNING,
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index d85a5036..96e1ef66 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1115,7 +1115,7 @@ cleanup:
{
int ret = b->ret;
FREE(b->line);
- memset(b, 0, sizeof(b));
+ memset(b, 0, sizeof(struct archive_read_buffer));
return ret;
}
}