home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 16964 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jem
  3. From: jem@snakemail.hut.fi (Johan Myreen)
  4. Subject: Re: ANNOUNCE: Linux 0.98 pl5
  5. In-Reply-To: jem@snakemail.hut.fi's message of 16 Nov 92 19:35:59 GMT
  6. Message-ID: <JEM.92Nov17135828@lk-hp-6.hut.fi>
  7. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  8. Nntp-Posting-Host: lk-hp-6.hut.fi
  9. Organization: Helsinki University of Technology, Finland
  10. References: <1992Nov15.220138.5434@klaava.Helsinki.FI> <JEM.92Nov16213559@lk-hp-6.hut.fi>
  11. Date: 17 Nov 92 11:58:27 GMT
  12. Lines: 17
  13.  
  14. In article <JEM.92Nov16213559@lk-hp-6.hut.fi> jem@snakemail.hut.fi (Johan Myreen) writes:
  15.  
  16. >This breaks code modifying string literals, like for instance the
  17. >mktemp library function when called like this: mktemp("/tmp/fooXXXXXX"). 
  18. >This is not a bug in Linux or Gcc, but in *your* application, if you
  19. >use mktemp like this, or do tricks like "bar"[2]++...
  20.  
  21. On second thought, these examples aren't very good, since the program 
  22. fragments are meaningless. But you get the idea: don't modify string
  23. constants, not even through a pointer.
  24.  
  25. Gcc offers the -fwritable-strings option as a quick fix for these
  26. non-standard programs.
  27.  
  28. --
  29. Johan Myreen
  30. jem@cs.hut.fi
  31.