aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-12-06 23:37:04 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:35 -0500
commit4a6e617a4bec9fb2ee4a16cf59565b2af5049e12 (patch)
tree4d69b8da779c58b506efe8f3fcae48d7b3c7bb4d /fs/udf/super.c
parente0980dafa329d33bb88edc8a3ef9fab4e070590c (diff)
[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/udf/super.c')
-rw-r--r--fs/udf/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 397f54aaf667..1dbc2955f02e 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1709,7 +1709,7 @@ void udf_error(struct super_block *sb, const char *function,
1709 sb->s_dirt = 1; 1709 sb->s_dirt = 1;
1710 } 1710 }
1711 va_start(args, fmt); 1711 va_start(args, fmt);
1712 vsprintf(error_buf, fmt, args); 1712 vsnprintf(error_buf, sizeof(error_buf), fmt, args);
1713 va_end(args); 1713 va_end(args);
1714 printk (KERN_CRIT "UDF-fs error (device %s): %s: %s\n", 1714 printk (KERN_CRIT "UDF-fs error (device %s): %s: %s\n",
1715 sb->s_id, function, error_buf); 1715 sb->s_id, function, error_buf);
@@ -1721,7 +1721,7 @@ void udf_warning(struct super_block *sb, const char *function,
1721 va_list args; 1721 va_list args;
1722 1722
1723 va_start (args, fmt); 1723 va_start (args, fmt);
1724 vsprintf(error_buf, fmt, args); 1724 vsnprintf(error_buf, sizeof(error_buf), fmt, args);
1725 va_end(args); 1725 va_end(args);
1726 printk(KERN_WARNING "UDF-fs warning (device %s): %s: %s\n", 1726 printk(KERN_WARNING "UDF-fs warning (device %s): %s: %s\n",
1727 sb->s_id, function, error_buf); 1727 sb->s_id, function, error_buf);