|
@@ -1335,6 +1335,11 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
|
|
|
|
|
|
list_add_tail (&f->list, frags);
|
|
list_add_tail (&f->list, frags);
|
|
found:
|
|
found:
|
|
|
|
+ if (rec >= f->num) {
|
|
|
|
+ ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (f->map & (1 << rec)) {
|
|
if (f->map & (1 << rec)) {
|
|
ldm_error ("Duplicate VBLK, part %d.", rec);
|
|
ldm_error ("Duplicate VBLK, part %d.", rec);
|
|
f->map &= 0x7F; /* Mark the group as broken */
|
|
f->map &= 0x7F; /* Mark the group as broken */
|