am d766090b: Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards

Merge commit 'd766090b7a72562be9e64700e13882663004650e' into gingerbread-plus-aosp

* commit 'd766090b7a72562be9e64700e13882663004650e':
  Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
gugelfrei
Bruce Beare 14 years ago committed by Android Git Automerger
commit 8f295e9dee

@ -189,9 +189,13 @@ void DirectVolume::handlePartitionAdded(const char *devpath, NetlinkEvent *evt)
#ifdef PARTITION_DEBUG
SLOGD("Dv:partAdd: part_num = %d, minor = %d\n", part_num, minor);
#endif
mPartMinors[part_num -1] = minor;
if (part_num >= MAX_PARTITIONS) {
SLOGE("Dv:partAdd: ignoring part_num = %d (max: %d)\n", part_num, MAX_PARTITIONS-1);
} else {
mPartMinors[part_num -1] = minor;
}
mPendingPartMap &= ~(1 << part_num);
if (!mPendingPartMap) {
#ifdef PARTITION_DEBUG
SLOGD("Dv:partAdd: Got all partitions - ready to rock!");

Loading…
Cancel
Save