aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-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);