aboutsummaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-11-09 00:49:04 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-11-09 15:06:32 +0100
commit998e9774781ac360d5d3704845c0e24d44c940f5 (patch)
treec14c432851ce4b3e146f2d6963368a3d14bf22f3 /ext2fs
parentce0fbff2a9d7daba2c97a33af9141efe7c7824a6 (diff)
downloadhurd-998e9774781ac360d5d3704845c0e24d44c940f5.tar.gz
hurd-998e9774781ac360d5d3704845c0e24d44c940f5.tar.bz2
hurd-998e9774781ac360d5d3704845c0e24d44c940f5.zip
Replace vsprintf with vsnprintf in ext2fs/msg.c
Message-Id: <Y2s/UPSCuGap3cv6@viriathus>
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/msg.c6
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);