diff options
author | Martin Sebor <msebor@redhat.com> | 2016-09-01 22:47:49 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2016-09-01 16:47:49 -0600 |
commit | 3d7b83b6718e54c7305b24dd73b44af1c11fc721 (patch) | |
tree | cf5a770b54a1fa30fb7b5d7835bb4cf4f1dc71cf /gcc/java | |
parent | 3b2475ab3178e98c61314b069cd64fe5ffa8bf45 (diff) | |
download | gcc-3d7b83b6718e54c7305b24dd73b44af1c11fc721.zip gcc-3d7b83b6718e54c7305b24dd73b44af1c11fc721.tar.gz gcc-3d7b83b6718e54c7305b24dd73b44af1c11fc721.tar.bz2 |
c-ada-spec.c (dump_ada_function_declaration): Increase buffer size to guarantee it fits the output of the formatted function...
gcc/c-family/ChangeLog:
* c-ada-spec.c (dump_ada_function_declaration): Increase buffer
size to guarantee it fits the output of the formatted function
regardless of its arguments.
gcc/cp/ChangeLog:
* mangle.c: Increase buffer size to guarantee it fits the output
of the formatted function regardless of its arguments.
gcc/go/ChangeLog:
* gofrontend/expressions.cc: Increase buffer size to guarantee
it fits the output of the formatted function regardless of its
arguments.
gcc/java/ChangeLog:
* decl.c (give_name_to_locals): Increase buffer size to guarantee
it fits the output of the formatted function regardless of its
arguments.
* mangle_name.c (append_unicode_mangled_name): Same.
gcc/ChangeLog:
* genmatch.c (parser::parse_expr): Increase buffer size to guarantee
it fits the output of the formatted function regardless of its
arguments.
* gcc/genmodes.c (parser::parse_expr): Same.
* gimplify.c (gimplify_asm_expr): Same.
* passes.c (pass_manager::register_one_dump_file): Same.
* print-tree.c (print_node): Same.
From-SVN: r239949
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/decl.c | 3 | ||||
-rw-r--r-- | gcc/java/mangle_name.c | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 74c5be8..781fecd 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2016-09-01 Martin Sebor <msebor@redhat.com> + + * decl.c (give_name_to_locals): Increase buffer size to guarantee + it fits the output of the formatted function regardless of its + arguments. + * mangle_name.c (append_unicode_mangled_name): Same. + 2016-08-26 Richard Biener <rguenther@suse.de> java/ diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 36989d3..70eac31 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1721,7 +1721,8 @@ give_name_to_locals (JCF *jcf) DECL_NAME (parm) = get_identifier ("this"); else { - char buffer[12]; + /* Buffer large enough for INT_MAX plus prefix. */ + char buffer[15]; sprintf (buffer, "ARG_%d", arg_i); DECL_NAME (parm) = get_identifier (buffer); } diff --git a/gcc/java/mangle_name.c b/gcc/java/mangle_name.c index 00374db..7627c5d 100644 --- a/gcc/java/mangle_name.c +++ b/gcc/java/mangle_name.c @@ -231,7 +231,8 @@ void append_gpp_mangled_name (const char *name, int len) { int encoded_len, needs_escapes; - char buf[6]; + /* Buffer large enough for INT_MIN. */ + char buf[9]; MANGLE_CXX_KEYWORDS (name, len); @@ -270,7 +271,8 @@ append_unicode_mangled_name (const char *name, int len) /* Everything else needs encoding */ else { - char buf [9]; + /* Buffer large enough for UINT_MAX plus the prefix. */ + char buf [13]; if (ch == '_' || ch == 'U') { /* Prepare to recognize __U */ |