From: LukeSkyD <100560115+LukeSkyD@users.noreply.github.com> Date: Fri, 31 May 2024 14:11:12 +0000 (+0200) Subject: rar reader: fix cast to unsigned int (#2209) X-Git-Tag: v3.7.5~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2386414abbc9e6f0ec9808f2a5dd067af1f5f528;p=thirdparty%2Flibarchive.git rar reader: fix cast to unsigned int (#2209) Fixes compiler error `C4267: '+=': conversion from 'size_t' to 'unsigned int'. Possible loss of data.` which stops compiling with MSVC. --- diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c index 123813084..354cb0d0b 100644 --- a/libarchive/archive_read_support_format_rar.c +++ b/libarchive/archive_read_support_format_rar.c @@ -3142,7 +3142,7 @@ copy_from_lzss_window_to_unp(struct archive_read *a, const void **buffer, } else { goto fatal; } - rar->unp_offset += length; + rar->unp_offset += (unsigned int) length; if (rar->unp_offset >= rar->unp_buffer_size) *buffer = rar->unp_buffer; else