[Bug fortran/23065] MAXPATHLEN usage in fortran/{scanner,module}.c

Andrew Pinski pinskia@physics.uc.edu
Mon Aug 1 19:26:00 GMT 2005


On Aug 1, 2005, at 2:26 PM, Steve Kargl wrote:

> On Mon, Aug 01, 2005 at 04:46:17PM -0000, pinskia at gcc dot gnu dot 
> org wrote:
>>
>> Well in both the cases in the fortran front-end, really an alloca
>> should be used instead of MAXPATHLEN.
>>
>
> The attached patches uses alloca to remove the use of PATH_MAX
> from gfortran.  It also fixes one other nearby hardcoded buffer.

This what I was thinking of.

This also fixes a buffer overflow that could have happened in 
gfc_dump_module.

Thanks,
Andrew Pinski

PS  scanner.s should be scanner.c in the ChangeLog.



More information about the Fortran mailing list