also check upper for wrap

This commit is contained in:
Serge Hallyn 2016-08-05 17:16:48 -05:00
parent 9df58a7545
commit 94da3dc5c8

View File

@ -89,7 +89,8 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
free(mappings);
return NULL;
}
if (mapping->lower + mapping->count < mapping->lower) {
if (mapping->lower + mapping->count < mapping->lower ||
mapping->upper + mapping->count < mapping->upper) {
free(mapping);
return NULL;
}