|
@@ -926,6 +926,11 @@ static int validate_vid_hdr(const struct ubi_device *ubi,
|
|
goto bad;
|
|
goto bad;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (data_size > ubi->leb_size) {
|
|
|
|
+ ubi_err(ubi, "bad data_size");
|
|
|
|
+ goto bad;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (vol_type == UBI_VID_STATIC) {
|
|
if (vol_type == UBI_VID_STATIC) {
|
|
/*
|
|
/*
|
|
* Although from high-level point of view static volumes may
|
|
* Although from high-level point of view static volumes may
|