aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/ChangeLog6
-rw-r--r--gcc/go/gofrontend/expressions.cc3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 2052a97..4c75010 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-01 Martin Sebor <msebor@redhat.com>
+
+ * gofrontend/expressions.cc: Increase buffer size to guarantee
+ it fits the output of the formatted function regardless of its
+ arguments.
+
2016-08-29 Ian Lance Taylor <iant@google.com>
* lang.opt (fgo-c-header, fgo-compiling-runtime): New options.
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 803611d..99f9f66 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -9050,7 +9050,8 @@ Call_expression::do_flatten(Gogo* gogo, Named_object*,
Location loc = this->location();
int i = 0;
- char buf[10];
+ /* Buffer large enough for INT_MAX plus the prefix. */
+ char buf[14];
for (Typed_identifier_list::const_iterator p = results->begin();
p != results->end();
++p, ++i)