From 42ae5accb15f116e3584ff462ca88de601924d71 Mon Sep 17 00:00:00 2001 From: Timo Warns Date: Thu, 19 May 2011 09:24:17 +0200 Subject: [PATCH] --- yaml --- r: 247762 b: refs/heads/master c: cae13fe4cc3f24820ffb990c09110626837e85d4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/partitions/ldm.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 679bb932e42b..00310bbb384a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e6c9366b2adb52cba64b359b3050200743c7568c +refs/heads/master: cae13fe4cc3f24820ffb990c09110626837e85d4 diff --git a/trunk/fs/partitions/ldm.c b/trunk/fs/partitions/ldm.c index ce4f62440425..a29d5ccf3d54 100644 --- a/trunk/fs/partitions/ldm.c +++ b/trunk/fs/partitions/ldm.c @@ -1335,6 +1335,11 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags) list_add_tail (&f->list, frags); found: + if (rec >= f->num) { + ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num); + return false; + } + if (f->map & (1 << rec)) { ldm_error ("Duplicate VBLK, part %d.", rec); f->map &= 0x7F; /* Mark the group as broken */