mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-28 08:36:15 +02:00
ZipInputAccessor: Fix invalid read
This commit is contained in:
parent
301f388716
commit
440214f9c1
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ struct ZipInputAccessor : InputAccessor
|
||||||
zip_uint16_t id, len;
|
zip_uint16_t id, len;
|
||||||
auto extra = zip_file_extra_field_get(zipFile, i, 0, &id, &len, ZIP_FL_CENTRAL);
|
auto extra = zip_file_extra_field_get(zipFile, i, 0, &id, &len, ZIP_FL_CENTRAL);
|
||||||
if (id == 0x5455 && len >= 5)
|
if (id == 0x5455 && len >= 5)
|
||||||
lastModified = std::max(lastModified, readLittleEndian<time_t>((unsigned char *) extra + 1));
|
lastModified = std::max(lastModified, (time_t) readLittleEndian<uint32_t>((unsigned char *) extra + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto slash = strchr(sb.name, '/');
|
auto slash = strchr(sb.name, '/');
|
||||||
|
|
Loading…
Reference in a new issue