From: AZero13 Date: Thu, 6 Nov 2025 15:02:41 +0000 (-0500) Subject: Set *result to 0 when the tar flush fails. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3396ba84d7f635b9c6cf7ff481d559916850170d;p=thirdparty%2Flibarchive.git Set *result to 0 when the tar flush fails. We should not uninitialize 0 when an error happens. Because t is then checked. --- diff --git a/libarchive/archive_read_support_format_tar.c b/libarchive/archive_read_support_format_tar.c index eeb2c725f..98f7d6995 100644 --- a/libarchive/archive_read_support_format_tar.c +++ b/libarchive/archive_read_support_format_tar.c @@ -2311,6 +2311,7 @@ pax_attribute_read_number(struct archive_read *a, size_t value_length, int64_t * archive_string_init(&as); r = read_bytes_to_string(a, &as, value_length, &unconsumed); if (tar_flush_unconsumed(a, &unconsumed) != ARCHIVE_OK) { + *result = 0; return (ARCHIVE_FATAL); } if (r < ARCHIVE_OK) {