From ac43e8e3fea3ed80cb7c35659decf8ca5a315ba9 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Tue, 22 Oct 2024 03:52:19 -0500 Subject: [PATCH] Reintroduce size_t cast to clarify the use of a u32 shift on a u64 arg (#2383) Regressed in #2285 --- libarchive/archive_read_support_format_rar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c index 9cf4d639a..83e8415cb 100644 --- a/libarchive/archive_read_support_format_rar.c +++ b/libarchive/archive_read_support_format_rar.c @@ -2803,7 +2803,7 @@ make_table(struct archive_read *a, struct huffman_code *code) else code->tablesize = code->maxlength; - code->table = calloc(1U << code->tablesize, sizeof(*code->table)); + code->table = calloc(((size_t)1U) << code->tablesize, sizeof(*code->table)); return make_table_recurse(a, code, 0, code->table, 0, code->tablesize); } -- 2.47.2