[exosphere] Fix bug in package2.c

This commit is contained in:
TuxSH 2018-05-17 16:14:20 +02:00
parent 3dac6c9268
commit 5b5d3c69c2

View file

@ -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;
}