mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 10:54:50 +08:00
* method.c (make_thunk): Avoid name buffer overflow.
From-SVN: r17784
This commit is contained in:
parent
13309a5ff9
commit
aea955a2df
@ -1,3 +1,7 @@
|
||||
Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
|
||||
|
||||
* method.c (make_thunk): Avoid name buffer overflow.
|
||||
|
||||
Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
|
||||
|
@ -1905,7 +1905,7 @@ make_thunk (function, delta)
|
||||
tree function;
|
||||
int delta;
|
||||
{
|
||||
char buffer[250];
|
||||
char *buffer;
|
||||
tree thunk_id;
|
||||
tree thunk;
|
||||
char *func_name;
|
||||
@ -1916,6 +1916,7 @@ make_thunk (function, delta)
|
||||
if (TREE_CODE (func_decl) != FUNCTION_DECL)
|
||||
abort ();
|
||||
func_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (func_decl));
|
||||
buffer = (char *)alloca (strlen (func_name) + 32);
|
||||
if (delta<=0)
|
||||
sprintf (buffer, "__thunk_%d_%s", -delta, func_name);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user