Re: getting env. variables in gfortran...



In article <Pine.LNX.4.64.0604140812380.20173@xxxxxxxxxxxxxxxxxxxxxxxxx>,
"George N. White III" <aa056@xxxxxxxxxxxxxx> writes:

Gfortran almost certainly implements "getenv" functionality in some
idiosyncratic, undocumented, and potentially unsafe (in the sense of not
checking that the buffer is long enough to hold "$PATH") way.

Undocumented? Surely, you're joking. The SOURCE CODE is available
for your perusal.

http://gcc.gnu.org/viewcvs/trunk/libgfortran/intrinsics/env.c?view=log

Unsafe? Well, check the SOURCE CODE.

Very few compilers (with the exceptions of f2c, g77, gfortran, openwatcom,
and g95) provide the SOURCE CODE for their runtime libraries.

The gfortran manual is missing the documentation of the
API for getenv, which I've already stated is available in
the g77 manual.

Ron Shepard also implemented some of the pxf functions. I've used his
library wqith g77 on OS/2, Win16, and NeXtStep, assorted unixes, and
linux. Now I'm using it with g95 on linux.

Without knocking Ron, have you checked the safety of his source code.
Where can one find his code?

--
Steve
http://troutmask.apl.washington.edu/~kargl/
.



Relevant Pages

  • Re: Video editing in Linux?
    ... whatever you would want, i would have to first get linux installed, ... It is totally viable that you could modify the source code out there ... in the same way that Windows security gets ... i doubt your cpu even hits 10% of its potential ...
    (alt.linux)
  • RE: possible GPL violation by Sigma Designs
    ... I purchased a Liteon LVD2001 DVD player which uses this Sigma EM8500 chipset ... and firmware running Linux. ... devices in the PCMCIA slot of this DVD player but source code for their ... drivers (GPL status for these is unknown), ...
    (Linux-Kernel)
  • RE: Running more than one service on one box
    ... Microsoft does allow some VERY LIMITED access to some ... but for the most part open source code (such as Linux) is much easier to fix ... As to your statement that an "out of the box" installation of Windows NT vs. ...
    (Security-Basics)
  • Re: what does "serialization" mean?
    ... > Corey just posted a reference to of the responses you made, ... > Does Barnes and Noble use Linux? ... >> applying modifications in source code is to be very disciplined about ... the author of Minix claims that it is not. ...
    (comp.programming)
  • Re: Linux in a product
    ... if you are not familiar with BSD source code then ... > Linux source code. ... I happen to be MUCH more familiar with the BSD source code (in ... and disadvantages of BSDL vs. GPL haven't really been fatal to us yet :-). ...
    (sci.electronics.design)