summaryrefslogtreecommitdiff
path: root/fs/ufs
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-12-07 07:37:04 +0300
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 19:39:35 +0300
commit4a6e617a4bec9fb2ee4a16cf59565b2af5049e12 (patch)
tree4d69b8da779c58b506efe8f3fcae48d7b3c7bb4d /fs/ufs
parente0980dafa329d33bb88edc8a3ef9fab4e070590c (diff)
downloadlinux-4a6e617a4bec9fb2ee4a16cf59565b2af5049e12.tar.xz
[PATCH] fs/*: trivial vsnprintf() conversion
It would very lame to get buffer overflow via one of the following. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 0b18d2cc2efa..8a8e9382ec09 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -224,7 +224,7 @@ void ufs_error (struct super_block * sb, const char * function,
sb->s_flags |= MS_RDONLY;
}
va_start (args, fmt);
- vsprintf (error_buf, fmt, args);
+ vsnprintf (error_buf, sizeof(error_buf), fmt, args);
va_end (args);
switch (UFS_SB(sb)->s_mount_opt & UFS_MOUNT_ONERROR) {
case UFS_MOUNT_ONERROR_PANIC:
@@ -255,7 +255,7 @@ void ufs_panic (struct super_block * sb, const char * function,
sb->s_dirt = 1;
}
va_start (args, fmt);
- vsprintf (error_buf, fmt, args);
+ vsnprintf (error_buf, sizeof(error_buf), fmt, args);
va_end (args);
sb->s_flags |= MS_RDONLY;
printk (KERN_CRIT "UFS-fs panic (device %s): %s: %s\n",
@@ -268,7 +268,7 @@ void ufs_warning (struct super_block * sb, const char * function,
va_list args;
va_start (args, fmt);
- vsprintf (error_buf, fmt, args);
+ vsnprintf (error_buf, sizeof(error_buf), fmt, args);
va_end (args);
printk (KERN_WARNING "UFS-fs warning (device %s): %s: %s\n",
sb->s_id, function, error_buf);