diff options
Diffstat (limited to 'ext2fs/msg.c')
-rw-r--r-- | ext2fs/msg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext2fs/msg.c b/ext2fs/msg.c index 83939b06..b6b1a155 100644 --- a/ext2fs/msg.c +++ b/ext2fs/msg.c @@ -47,7 +47,7 @@ void _ext2_error (const char * function, const char * fmt, ...) pthread_mutex_lock (&printf_lock); va_start (args, fmt); - vsprintf (error_buf, fmt, args); + vsnprintf (error_buf, sizeof (error_buf), fmt, args); va_end (args); fprintf (stderr, "ext2fs: %s: %s: %s\n", diskfs_disk_name, function, error_buf); @@ -62,7 +62,7 @@ void _ext2_panic (const char * function, const char * fmt, ...) pthread_mutex_lock (&printf_lock); va_start (args, fmt); - vsprintf (error_buf, fmt, args); + vsnprintf (error_buf, sizeof (error_buf), fmt, args); va_end (args); fprintf(stderr, "ext2fs: %s: panic: %s: %s\n", @@ -80,7 +80,7 @@ void ext2_warning (const char * fmt, ...) pthread_mutex_lock (&printf_lock); va_start (args, fmt); - vsprintf (error_buf, fmt, args); + vsnprintf (error_buf, sizeof (error_buf), fmt, args); va_end (args); fprintf (stderr, "ext2fs: %s: warning: %s\n", diskfs_disk_name, error_buf); |