From: Dustin L. Howett Date: Tue, 22 Oct 2024 08:52:19 +0000 (-0500) Subject: Reintroduce size_t cast to clarify the use of a u32 shift on a u64 arg (#2383) X-Git-Tag: v3.8.0~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac43e8e3fea3ed80cb7c35659decf8ca5a315ba9;p=thirdparty%2Flibarchive.git Reintroduce size_t cast to clarify the use of a u32 shift on a u64 arg (#2383) Regressed in #2285 --- 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); }