diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2021-12-03 15:07:52 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2021-12-03 15:11:26 +0100 |
commit | 0acb19ffb2cf8a2dcef3beb44f1c4af670d2219d (patch) | |
tree | 012623054079edba57b292f6d2f8a0a2d417a104 /URPM.xs | |
parent | f0e647904524953a92871d2ac5ed88f87fb65ecb (diff) | |
download | perl-URPM-0acb19ffb2cf8a2dcef3beb44f1c4af670d2219d.tar perl-URPM-0acb19ffb2cf8a2dcef3beb44f1c4af670d2219d.tar.gz perl-URPM-0acb19ffb2cf8a2dcef3beb44f1c4af670d2219d.tar.bz2 perl-URPM-0acb19ffb2cf8a2dcef3beb44f1c4af670d2219d.tar.xz perl-URPM-0acb19ffb2cf8a2dcef3beb44f1c4af670d2219d.zip |
Harmonize buffer size
Thus fixing "invalid line <@provides for huge pkgs"...
The fix in 5.221 was fixing emiting provides in synthesis for pkgs with
lot of provides, but neither URPM or urpmi testsuite uses such a pkg and
didn't catch that having those provides in synthesis would break reading
synthesis.
See commit 950d56e991d307b9b60bde8f51920bee3d1bc61c
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -141,6 +141,8 @@ typedef struct s_Package* URPM__Package; #define WEAK_DEPS_ARE_SUPPORTED #endif +#define BUF_SIZE 65536*3 + static ssize_t write_nocheck(int fd, const void *buf, size_t count) { return write(fd, buf, count); } @@ -754,7 +756,7 @@ return_problems(rpmps ps, int translate_message, int raw_message) { static char * pack_list(const Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version) { - char buff[65536*2]; + char buff[BUF_SIZE]; char *p = buff; struct rpmtd_s td; @@ -2177,7 +2179,7 @@ Pkg_build_info(pkg, fileno, provides_files=NULL, recommends=0) int recommends CODE: if (pkg->info) { - char buff[65536*3]; + char buff[BUF_SIZE]; UV size; /* info line should be the last to be written */ @@ -2937,7 +2939,7 @@ Urpm_parse_synthesis__XS(urpm, filename, ...) HV *obsoletes = fobsoletes && SvROK(*fobsoletes) && SvTYPE(SvRV(*fobsoletes)) == SVt_PVHV ? (HV*)SvRV(*fobsoletes) : NULL; if (depslist != NULL) { - char buff[65536*2]; + char buff[BUF_SIZE]; char *p, *eol; int buff_len; struct s_Package pkg; |