Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Orig-Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368 Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
This commit is contained in:
parent
c51920c824
commit
d11b833201
1 changed files with 6 additions and 2 deletions
|
@ -202,9 +202,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
|
||||
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…
Reference in a new issue