aboutsummaryrefslogtreecommitdiff
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
parent71f51525ec5e4c7984261cb53912e13a3e736394 (diff)
downloadgdb-a9bfff94add1508b7ffd9b4541ef9fa74e3de88d.zip
gdb-a9bfff94add1508b7ffd9b4541ef9fa74e3de88d.tar.gz
gdb-a9bfff94add1508b7ffd9b4541ef9fa74e3de88d.tar.bz2
Use vsnprintf instead of vsprintf.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/messages.c16
2 files changed, 12 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3cac97b..a81af53 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2005-07-20 Tavis Ormandy <taviso@gentoo.org>
+
+ * messages.c: Use vsnprintf instead of vsprintf.
+
2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* config/tc-m32r.c (tc_gen_reloc): Check BFD_RELOC_32_PCREL and
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);