]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Update libarchive/archive_read_data_into_fd.c 3232/head
authorTim Kientzle <kientzle@acm.org>
Sat, 4 Jul 2026 16:48:31 +0000 (09:48 -0700)
committerGitHub <noreply@github.com>
Sat, 4 Jul 2026 16:48:31 +0000 (09:48 -0700)
Co-authored-by: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
libarchive/archive_read_data_into_fd.c

index 241a3ca64ea3770789132e600cfdcd35b6f121ad..d92ab9a512533b37a55464e691c8cd036bdd2a2e 100644 (file)
@@ -126,7 +126,7 @@ archive_read_data_into_fd(struct archive *a, int fd)
                                target_offset = declared_size;
                                size = 0;
                                overran = 1;
-                       } else if ((int64_t)size > declared_size - target_offset) {
+                       } else if (size > (uint64_t)(declared_size - target_offset)) {
                                /* Above is safe because target_offset <= declared_size */
                                /* This block is bigger than the expected remainder */
                                size = (size_t)(declared_size - target_offset);