summaryrefslogtreecommitdiffstats
path: root/fs/partitions/ldm.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-03-04 11:12:24 +0100
committerIngo Molnar <mingo@elte.hu>2011-03-04 11:12:26 +0100
commite0a92c17470775cd85bac52f5372ccc3dc58254a (patch)
tree9339da8754084bed50b941b018706b75482025cb /fs/partitions/ldm.c
parent544b4a1f309d18f40969dbab7e08bafd136b2f55 (diff)
parent0c3b9168017cbad2c4af3dd65ec93fe646eeaa62 (diff)
downloadop-kernel-dev-e0a92c17470775cd85bac52f5372ccc3dc58254a.zip
op-kernel-dev-e0a92c17470775cd85bac52f5372ccc3dc58254a.tar.gz
Merge branch 'sched/urgent' into sched/core
Merge reason: Add fixes before applying dependent patches. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/partitions/ldm.c')
-rw-r--r--fs/partitions/ldm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c
index 789c625..b10e354 100644
--- a/fs/partitions/ldm.c
+++ b/fs/partitions/ldm.c
@@ -251,6 +251,11 @@ static bool ldm_parse_vmdb (const u8 *data, struct vmdb *vm)
}
vm->vblk_size = get_unaligned_be32(data + 0x08);
+ if (vm->vblk_size == 0) {
+ ldm_error ("Illegal VBLK size");
+ return false;
+ }
+
vm->vblk_offset = get_unaligned_be32(data + 0x0C);
vm->last_vblk_seq = get_unaligned_be32(data + 0x04);
OpenPOWER on IntegriCloud