From 998e9774781ac360d5d3704845c0e24d44c940f5 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Wed, 9 Nov 2022 00:49:04 -0500 Subject: Replace vsprintf with vsnprintf in ext2fs/msg.c Message-Id: --- ext2fs/msg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext2fs/msg.c') 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); -- cgit v1.2.3