Commit f1430380 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] block2mtd 64bit bug

Passing pointer to size_t to function that expects u32 * and actually
stores a value there... 
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d6e45529
...@@ -422,7 +422,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp) ...@@ -422,7 +422,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
char *token[2]; char *token[2];
char *name; char *name;
size_t erase_size = PAGE_SIZE; u32 erase_size = PAGE_SIZE;
int i, ret; int i, ret;
if (strnlen(val, sizeof(buf)) >= sizeof(buf)) if (strnlen(val, sizeof(buf)) >= sizeof(buf))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment