mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
Enforce signature download size limit on -U <url> operations
We had a 16 KiB limit on database signatures, we should do the same here too to have a slight sanity check, even if we can't do so for the package itself yet. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
61ce2ca1bb
commit
d85d0ddcfe
@ -604,6 +604,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,
|
||||
|
Loading…
Reference in New Issue
Block a user