add bounds checking for mPartMinors[]

Change-Id: I6d5b26756c8434d6396f3535252608ce61eabfd8
gugelfrei
Nick Kralevich 13 years ago
parent a28056b382
commit f3d3ce5e53

@ -186,6 +186,11 @@ void DirectVolume::handlePartitionAdded(const char *devpath, NetlinkEvent *evt)
part_num = 1;
}
if (part_num > MAX_PARTITIONS || part_num < 1) {
SLOGW("Invalid 'PARTN' value");
part_num = 1;
}
if (part_num > mDiskNumParts) {
mDiskNumParts = part_num;
}

Loading…
Cancel
Save