summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-04-05 10:12:04 -0400
committerAllan McRae <allan@archlinux.org>2013-04-06 12:55:09 +1000
commitb5a7734a7ecdd35f64f33eeed5252423ca005fd2 (patch)
tree5dfbb5e33b9954ed06fe809c6af9b6ce9c3df1a8
parent5caf143faaa64bd76c10c8e35dd0adbfd8619615 (diff)
downloadpacman-b5a7734a7ecdd35f64f33eeed5252423ca005fd2.tar.xz
use off_t for table_row_t.size
size went from off_t in _display_targets to int in add_transaction_sizes and back to off_t in humanize_size leading to potential overflows. Fixes FS#34616. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 862c8e8b..643b6fea 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -49,7 +49,7 @@
struct table_row_t {
const char *label;
- int size;
+ off_t size;
};
int trans_init(alpm_transflag_t flags, int check_valid)
@@ -828,7 +828,7 @@ static alpm_list_t *create_verbose_row(pm_target_t *target)
return ret;
}
-static void add_transaction_sizes_row(alpm_list_t **table, const char *label, int size)
+static void add_transaction_sizes_row(alpm_list_t **table, const char *label, off_t size)
{
struct table_row_t *row = malloc(sizeof(struct table_row_t));