aboutsummaryrefslogtreecommitdiff
path: root/gas/messages.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-07-21 08:03:54 +0000
committerNick Clifton <nickc@redhat.com>2005-07-21 08:03:54 +0000
commita9bfff94add1508b7ffd9b4541ef9fa74e3de88d (patch)
tree325b26d57e060f0d9e8debaaf4ef3794ace66009 /gas/messages.c
parent71f51525ec5e4c7984261cb53912e13a3e736394 (diff)
downloadgdb-a9bfff94add1508b7ffd9b4541ef9fa74e3de88d.zip
gdb-a9bfff94add1508b7ffd9b4541ef9fa74e3de88d.tar.gz
gdb-a9bfff94add1508b7ffd9b4541ef9fa74e3de88d.tar.bz2
Use vsnprintf instead of vsprintf.
Diffstat (limited to 'gas/messages.c')
-rw-r--r--gas/messages.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gas/messages.c b/gas/messages.c
index a2d7d1d..8ce6bc7 100644
--- a/gas/messages.c
+++ b/gas/messages.c
@@ -233,7 +233,7 @@ as_warn (const char *format, ...)
if (!flag_no_warnings)
{
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal ((char *) NULL, 0, buffer);
}
@@ -250,7 +250,7 @@ as_warn (format, va_alist)
if (!flag_no_warnings)
{
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal ((char *) NULL, 0, buffer);
}
@@ -271,7 +271,7 @@ as_warn_where (char *file, unsigned int line, const char *format, ...)
if (!flag_no_warnings)
{
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal (file, line, buffer);
}
@@ -290,7 +290,7 @@ as_warn_where (file, line, format, va_alist)
if (!flag_no_warnings)
{
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal (file, line, buffer);
}
@@ -332,7 +332,7 @@ as_bad (const char *format, ...)
char buffer[2000];
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal ((char *) NULL, 0, buffer);
@@ -348,7 +348,7 @@ as_bad (format, va_alist)
char buffer[2000];
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal ((char *) NULL, 0, buffer);
@@ -367,7 +367,7 @@ as_bad_where (char *file, unsigned int line, const char *format, ...)
char buffer[2000];
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal (file, line, buffer);
@@ -385,7 +385,7 @@ as_bad_where (file, line, format, va_alist)
char buffer[2000];
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal (file, line, buffer);