From cc8e96c8dccea1e8041db3146d389175582d3890 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 29 Apr 2011 16:07:45 -0700 Subject: DirectVolume: don't continue on invalid PARTN value Change-Id: I1e434c5b47b40fabaf1e702d7f2e43a88c0497dc --- DirectVolume.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'DirectVolume.cpp') diff --git a/DirectVolume.cpp b/DirectVolume.cpp index 54da964..2ca0e72 100644 --- a/DirectVolume.cpp +++ b/DirectVolume.cpp @@ -187,8 +187,8 @@ void DirectVolume::handlePartitionAdded(const char *devpath, NetlinkEvent *evt) } if (part_num > MAX_PARTITIONS || part_num < 1) { - SLOGW("Invalid 'PARTN' value"); - part_num = 1; + SLOGE("Invalid 'PARTN' value"); + return; } if (part_num > mDiskNumParts) { -- cgit v1.2.3