OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'char-misc-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[uclinux-h8/linux.git]
/
drivers
/
mtd
/
ubi
/
io.c
diff --git
a/drivers/mtd/ubi/io.c
b/drivers/mtd/ubi/io.c
index
5bbd1f0
..
1fc23e4
100644
(file)
--- a/
drivers/mtd/ubi/io.c
+++ b/
drivers/mtd/ubi/io.c
@@
-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) {
/*
* Although from high-level point of view static volumes may
if (vol_type == UBI_VID_STATIC) {
/*
* Although from high-level point of view static volumes may