diff options
author | Nick Kralevich <nnk@google.com> | 2011-04-18 11:44:57 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-18 11:44:57 -0700 |
commit | aecf0e2a3dd1a72e448d9df7ed69533578dda12c (patch) | |
tree | e319f7352142cf38060aa2e711f6e624954c3211 /DirectVolume.cpp | |
parent | c1d80272b117cf837de93fadd8d456d89a203e2f (diff) | |
parent | f3d3ce5e53ab7928f4c292c183c417a1bd051151 (diff) | |
download | system_vold-aecf0e2a3dd1a72e448d9df7ed69533578dda12c.tar.gz system_vold-aecf0e2a3dd1a72e448d9df7ed69533578dda12c.tar.bz2 system_vold-aecf0e2a3dd1a72e448d9df7ed69533578dda12c.zip |
am f3d3ce5e: add bounds checking for mPartMinors[]
* commit 'f3d3ce5e53ab7928f4c292c183c417a1bd051151':
add bounds checking for mPartMinors[]
Diffstat (limited to 'DirectVolume.cpp')
-rw-r--r-- | DirectVolume.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/DirectVolume.cpp b/DirectVolume.cpp index 3191cc7..54da964 100644 --- a/DirectVolume.cpp +++ b/DirectVolume.cpp @@ -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; } |