git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
UBI: fix nameless volumes handling
[pandora-kernel.git]
/
drivers
/
mtd
/
ubi
/
cdev.c
diff --git
a/drivers/mtd/ubi/cdev.c
b/drivers/mtd/ubi/cdev.c
index
3320a50
..
ad76592
100644
(file)
--- 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,
if (req->alignment != 1 && n)
goto bad;
+ if (!req->name[0] || !req->name_len)
+ goto bad;
+
if (req->name_len > UBI_VOL_NAME_MAX) {
err = -ENAMETOOLONG;
goto bad;