diff --git a/exosphere/src/package2.c b/exosphere/src/package2.c index e15dc39df..46f667050 100644 --- a/exosphere/src/package2.c +++ b/exosphere/src/package2.c @@ -198,7 +198,7 @@ static bool validate_package2_metadata(package2_meta_t *metadata) { uint8_t header_version = (uint8_t)((metadata->ctr_dwords[1] ^ (metadata->ctr_dwords[1] >> 16) ^ (metadata->ctr_dwords[1] >> 24)) & 0xFF); /* Ensure package isn't too big or too small. */ - if (package_size <= sizeof(package2_header_t) || package_size > PACKAGE2_SIZE_MAX - sizeof(package2_header_t)) { + if (package_size <= sizeof(package2_header_t) || package_size > PACKAGE2_SIZE_MAX) { return false; }