[patch,libgfortran] Bug 61632 - memory corruption when writing formatted data
Janne Blomqvist
blomqvist.janne@gmail.com
Mon Jul 14 09:48:00 GMT 2014
On Mon, Jul 14, 2014 at 12:39 AM, Jerry DeLisle <jvdelisle@charter.net> wrote:
> Hi all,
>
> This bug was caused by an access to an invalid pointer offset to the format
> string. This was only a problem on the second error using the same format
> string. I suspect it has to do with caching the format strings. Regardless,
> the patch fixes this by using the fortran style string lengths to calculate the
> position in the string where the error occurs.
>
> Test case attached.
>
> Regression tested on x86-64.
>
> OK for trunk?
Ok, thanks.
>
> 2014-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
> PR libgfortran/61632
> * io/format.c (format_error): Avoid invalid string pointer by
> using the fortran string length values to generate error string.
--
Janne Blomqvist
More information about the Fortran
mailing list