3c23183a62
- add some fixes for hppa, though it still isn't ready for prime time yet. Chances are it will only work with -O1, pending testing. Many optimisations lead to broken code and segfaults on hppa. Joint work with jsg@. - fix libstdc++ upgrade path - bring in recent fixes for execinfo/magic.h from 4.6 ok espie@
22 lines
670 B
Plaintext
22 lines
670 B
Plaintext
$OpenBSD: patch-libiberty_cp-demangle_c,v 1.2 2012/07/01 18:56:45 pascal Exp $
|
|
--- libiberty/cp-demangle.c.orig Thu Mar 22 19:34:16 2012
|
|
+++ libiberty/cp-demangle.c Wed Jun 20 14:39:13 2012
|
|
@@ -3579,7 +3579,7 @@ static inline void
|
|
d_append_num (struct d_print_info *dpi, long l)
|
|
{
|
|
char buf[25];
|
|
- sprintf (buf,"%ld", l);
|
|
+ snprintf (buf, 25, "%ld", l);
|
|
d_append_string (dpi, buf);
|
|
}
|
|
|
|
@@ -5345,7 +5345,7 @@ __cxa_demangle (const char *mangled_name, char *output
|
|
{
|
|
if (strlen (demangled) < *length)
|
|
{
|
|
- strcpy (output_buffer, demangled);
|
|
+ strlcpy (output_buffer, demangled, *length);
|
|
free (demangled);
|
|
demangled = output_buffer;
|
|
}
|