Files
linux/fs/fat
Nikolaus Schulz 46049d3840 fat: fix buffer overflow in vfat_create_shortname()
commit 30d1872d9e upstream.

When using the string representation of a random counter as part of the base
name, ensure that it is no longer than 4 bytes.

Since we are repeatedly decrementing the counter in a loop until we have found a
unique base name, the counter may wrap around zero; therefore, it is not enough
to mask its higher bits before entering the loop, this must be done inside the
loop.

[hirofumi@mail.parknet.co.jp: use snprintf()]
Signed-off-by: Nikolaus Schulz <microschulz@web.de>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-26 07:41:13 -07:00
..
2009-06-04 02:34:51 +09:00
2009-07-12 12:22:34 -07:00
2009-09-20 01:35:25 +09:00
2009-09-14 17:08:17 +02:00
2009-04-17 09:32:11 -07:00
2009-07-12 12:22:34 -07:00