This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011
> --- src/gdb/linux-nat.c 2011/05/27 16:55:38 1.206
> +++ src/gdb/linux-nat.c 2011/05/30 19:26:36 1.207
> @@ -2365,7 +2365,7 @@
> FILE *procfile;
> int retval = 0;
>
> - sprintf (buffer, "/proc/%ld/status", lwp);
> + xsnprintf (buffer, sizeof (buffer), "/proc/%ld/status", lwp);
Elegant (duh!). I'll update the ARI documentation to mention xsnprintf
as well - the xstrprintf suggestion really put me in target-lock mode,
and I failed to think beyond it...
--
Joel