Title: [7429] trunk/fs/romfs/storage.c: An interestingly corrupted romfs file system exposed a problem with the
- Revision
- 7429
- Author
- bernds
- Date
- 2009-09-23 07:14:00 -0400 (Wed, 23 Sep 2009)
Log Message
An interestingly corrupted romfs file system exposed a problem with the
romfs_dev_strnlen function: it's passing the wrong value to its helpers.
Rather than limit the string to the length passed in by the callers, it
uses the size of the device as the limit.
Modified Paths
Diff
Modified: trunk/fs/romfs/storage.c (7428 => 7429)
--- trunk/fs/romfs/storage.c 2009-09-23 11:08:55 UTC (rev 7428)
+++ trunk/fs/romfs/storage.c 2009-09-23 11:14:00 UTC (rev 7429)
@@ -253,11 +253,11 @@
#ifdef CONFIG_ROMFS_ON_MTD
if (sb->s_mtd)
- return romfs_mtd_strnlen(sb, pos, limit);
+ return romfs_mtd_strnlen(sb, pos, maxlen);
#endif
#ifdef CONFIG_ROMFS_ON_BLOCK
if (sb->s_bdev)
- return romfs_blk_strnlen(sb, pos, limit);
+ return romfs_blk_strnlen(sb, pos, maxlen);
#endif
return -EIO;
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits