projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cf9827
)
[MTD] Fix length comparison in MEMREADOOB
author
Thomas Gleixner
<tglx@inhell4.(none)>
Fri, 13 Apr 2007 17:50:48 +0000
(19:50 +0200)
committer
David Woodhouse
<dwmw2@infradead.org>
Tue, 17 Apr 2007 17:40:00 +0000
(13:40 -0400)
The ops.len member is not initialized, because it is unused for this
operation. The length check needs to use ops.ooblen instead
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/mtdchar.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/mtdchar.c
b/drivers/mtd/mtdchar.c
index 1592eac64e57baaefb8daecabfe700b27277247a..8c86b802f212afa98ca588d06717e46d4b9afe3f 100644
(file)
--- a/
drivers/mtd/mtdchar.c
+++ b/
drivers/mtd/mtdchar.c
@@
-553,7
+553,7
@@
static int mtd_ioctl(struct inode *inode, struct file *file,
ops.datbuf = NULL;
ops.mode = MTD_OOB_PLACE;
- if (ops.ooboffs && ops.len > (mtd->oobsize - ops.ooboffs))
+ if (ops.ooboffs && ops.
oob
len > (mtd->oobsize - ops.ooboffs))
return -EINVAL;
ops.oobbuf = kmalloc(buf.length, GFP_KERNEL);