home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / linux / 7075 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  2.0 KB

  1. Path: sparky!uunet!mcsun!uknet!mucs!mccuts!zlsiial
  2. From: zlsiial@uts.mcc.ac.uk (A. V. Le Blanc)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: mtools, compiling problems
  5. Message-ID: <5473@mccuts.uts.mcc.ac.uk>
  6. Date: 30 Jul 92 12:39:43 GMT
  7. References: <5561@umriscc.isc.umr.edu>
  8. Organization: Computing Centre, University of Manchester
  9. Lines: 31
  10.  
  11. In article <5561@umriscc.isc.umr.edu> dminer@mcs213f.cs.umr.edu (Dan Miner) writes:
  12. >    Well, I finally got around to updating my system.  I got
  13. >bunches of stuff.  I have gcc 2.2.2 installed.  Now, I'm trying to 
  14. >compile the mtools (the one that is one file for all) and I got
  15. >a problem.  When linking, gcc complains that got_signal isn't there.
  16.  
  17. The patches which I used to compile the single file mtools in the last
  18. MCC interim version of Linux can be found at ftp.mcc.ac.uk in mtool205.ud.Z
  19. in /pub/linux/mcc-interim/0.96c/patches.  They do not have this problem.
  20.  
  21. >Also, gcc complains about gets() in stdio.. saying that you shouldn't
  22. >use it?  Why on earth is that in there?  If you have functions that
  23. >are that unreliable, REMOVE IT!  I do believe it is ansi, so why say
  24. >something like that?  *fume*
  25.  
  26. My patches referred to above in fact change all the gets() calls to
  27. fgets().  The gets function is inherently dangerous because it makes
  28. no safety check on the length of the string read; therefore any
  29. call to gets may cause the program to abort or, worse, overwrite
  30. other data if the input is longer than the buffer.  I suspect the
  31. ANSI committee would have liked to drop gets, but couldn't give the
  32. possibilty of dropping it serious consideration because of its
  33. extensive use in existing programs.  The use of gets was one of the
  34. weaknesses exploited by the renowned Morris Internet Worm.  Anyway,
  35. the GNU C library (to which I think the warning belongs) clearly
  36. must contain gets to be ANSI, but wishes to discourage you from
  37. using it.  Whether the chosen method is ideal is debatable, and I
  38. don't know whether you can suppress the warning messages.
  39.  
  40.      -- Owen
  41.      LeBlanc@mcc.ac.uk
  42.