Check for out-of-range disk/partition numbers in get_disk/partinfo_struct