diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 3320a50ba4f0..ad76592fb2f4 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -632,6 +632,9 @@ static int verify_mkvol_req(const struct ubi_device *ubi, | |||
632 | if (req->alignment != 1 && n) | 632 | if (req->alignment != 1 && n) |
633 | goto bad; | 633 | goto bad; |
634 | 634 | ||
635 | if (!req->name[0] || !req->name_len) | ||
636 | goto bad; | ||
637 | |||
635 | if (req->name_len > UBI_VOL_NAME_MAX) { | 638 | if (req->name_len > UBI_VOL_NAME_MAX) { |
636 | err = -ENAMETOOLONG; | 639 | err = -ENAMETOOLONG; |
637 | goto bad; | 640 | goto bad; |