This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32554] [4.3 regression] Bug in P formatting



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]