@@ -246,11 +246,11 @@ void *pool = objc_autoreleasePoolPush(); OFString *fileName = entry.fileName; OFString *outFileName, *directory; OFStream *stream; OFFile *output; - uint64_t written = 0, size = entry.uncompressedSize; + unsigned long long written = 0, size = entry.uncompressedSize; int8_t percent = -1, newPercent; if (!all && ![files containsObject: fileName]) continue; @@ -437,15 +437,15 @@ @"file", fileName)]; entry = [OFMutableZIPArchiveEntry entryWithFileName: fileName]; size = (isDirectory ? 0 : attributes.fileSize); - if (size > INT64_MAX) + if (size < 0 || size > ULLONG_MAX) @throw [OFOutOfRangeException exception]; - entry.compressedSize = (int64_t)size; - entry.uncompressedSize = (int64_t)size; + entry.compressedSize = size; + entry.uncompressedSize = size; entry.compressionMethod = OFZIPArchiveEntryCompressionMethodNone; entry.modificationDate = attributes.fileModificationDate;