This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32554] [4.3 regression] Bug in P formatting
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2007 00:32:17 -0000
- Subject: [Bug fortran/32554] [4.3 regression] Bug in P formatting
- References: <bug-32554-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from kargl at gcc dot gnu dot org 2007-06-30 00:32 -------
(In reply to comment #3)
> This appears to fix it but I am not sure yet. More testing.
>
> */
> #ifdef HAVE_SNPRINTF
> - snprintf (buffer, sizeof (buffer), "%+-#" STR(MIN_FIELD_WIDTH) ".*"
> + snprintf (buffer, sizeof (buffer)+1, "%+-#" STR(MIN_FIELD_WIDTH) ".*"
> GFC_REAL_LARGEST_FORMAT "e", ndigits - 1, value);
Are you sure? That looks like a buffer overflow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32554