commit | f3d3ce5e53ab7928f4c292c183c417a1bd051151 | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Mon Apr 18 11:16:13 2011 -0700 |
committer | Nick Kralevich <nnk@google.com> | Mon Apr 18 11:16:13 2011 -0700 |
tree | ae9d413e16c8fee8354bb31d97490642597a2f90 | |
parent | a28056b38275003895ff5d9576681aca01544822 [diff] [blame] |
add bounds checking for mPartMinors[] Change-Id: I6d5b26756c8434d6396f3535252608ce61eabfd8
diff --git a/DirectVolume.cpp b/DirectVolume.cpp index ce5b892..0ac1a0c 100644 --- a/DirectVolume.cpp +++ b/DirectVolume.cpp
@@ -186,6 +186,11 @@ 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; }