[PATCH] (8/27) block2mtd 64bit bug

Al Viro viro at parcelfarce.linux.theplanet.co.uk
Wed Feb 2 14:16:33 EST 2005


	Passing pointer to size_t to function that expects u32 * and actually
stores a value there...
Signed-off-by: Al Viro <viro at parcelfarce.linux.theplanet.co.uk>
----
diff -urN RC11-rc2-bk10-sent/drivers/mtd/devices/block2mtd.c RC11-rc2-bk10-mtd/drivers/mtd/devices/block2mtd.c
--- RC11-rc2-bk10-sent/drivers/mtd/devices/block2mtd.c	Fri Jan 21 22:46:40 2005
+++ RC11-rc2-bk10-mtd/drivers/mtd/devices/block2mtd.c	Wed Feb  2 08:27:37 2005
@@ -422,7 +422,7 @@
 	char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
 	char *token[2];
 	char *name;
-	size_t erase_size = PAGE_SIZE;
+	u32 erase_size = PAGE_SIZE;
 	int i, ret;
 
 	if (strnlen(val, sizeof(buf)) >= sizeof(buf))




More information about the linux-mtd mailing list