From 440214f9c1ce6b03607df48122d14558f5197c87 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 30 Aug 2022 18:00:44 +0200 Subject: [PATCH] ZipInputAccessor: Fix invalid read --- src/libfetchers/zip-input-accessor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libfetchers/zip-input-accessor.cc b/src/libfetchers/zip-input-accessor.cc index 7091e3664..3ba0c5080 100644 --- a/src/libfetchers/zip-input-accessor.cc +++ b/src/libfetchers/zip-input-accessor.cc @@ -61,7 +61,7 @@ struct ZipInputAccessor : InputAccessor zip_uint16_t id, len; auto extra = zip_file_extra_field_get(zipFile, i, 0, &id, &len, ZIP_FL_CENTRAL); if (id == 0x5455 && len >= 5) - lastModified = std::max(lastModified, readLittleEndian((unsigned char *) extra + 1)); + lastModified = std::max(lastModified, (time_t) readLittleEndian((unsigned char *) extra + 1)); } auto slash = strchr(sb.name, '/');