Patch for libgfortran PR 18891
Richard Henderson
rth@redhat.com
Sat Dec 11 01:13:00 GMT 2004
On Fri, Dec 10, 2004 at 04:44:34PM -0800, Steve Ellcey wrote:
> I also changed some of my memcpy calls to use an
> existing variable as the length of the memcpy instead of sizeof()
> because the variable in question was set based on sizeof() earlier in
> the routine.
I don't buy this argument.
> + gfc_offset i;
...
> ! memcpy (&i, p, n);
> ! current_unit->bytes_left = i;
n had better be sizeof(i), or you are reading from uninitialized memory.
r~
More information about the Fortran
mailing list