diff --git a/lib/libarchive/archive_read.c b/lib/libarchive/archive_read.c index aa90b3f88e4d..071c6a160503 100644 --- a/lib/libarchive/archive_read.c +++ b/lib/libarchive/archive_read.c @@ -433,7 +433,7 @@ archive_read_data(struct archive *a, void *buff, size_t s) } /* Compute the amount of zero padding needed. */ - if (a->read_data_output_offset + s < + if (a->read_data_output_offset + (off_t)s < a->read_data_offset) { len = s; } else if (a->read_data_output_offset <