This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Debug mode output broken
- From: "Kaspar Fischer" <kasparfischer at gmx dot net>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 6 Aug 2004 16:50:31 +0200 (MEST)
- Subject: Re: Debug mode output broken
> Index: src/debug.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libstdc++-v3/src/debug.cc,v
> retrieving revision 1.3.10.2
> diff -u -p -b -B -r1.3.10.2 debug.cc
> --- src/debug.cc 15 May 2004 21:17:59 -0000
> 1.3.10.2
> +++ src/debug.cc 6 Aug 2004 10:54:15 -0000
> @@ -506,6 +506,7 @@ namespace __gnu_debug
> std::snprintf(__buf, __n, __fmt, __s);
> #else
> std::sprintf(__buf, __fmt, __s);
> + __buf[__n-1] = '\0';
> #endif
This works for me, on both PowerPC and SPARC
(neglecting the potential buffer overflow
problem).
Thanks a lot!
Kaspar
--
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl