home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15818 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  2.1 KB

  1. Path: sparky!uunet!cbmvax!bagate!dsinc!cs.widener.edu!eff!news.byu.edu!gatech!concert!sas!mozart.unx.sas.com!jamie
  2. From: jamie@cdevil.unx.sas.com (James Cooper)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Bug in SAS/C 6.0 library : strstr ()
  5. Message-ID: <Bxo8KK.573@unx.sas.com>
  6. Date: 13 Nov 92 20:21:55 GMT
  7. References: <hadig.721653082@rama> <Bxnw8z.CvD@unx.sas.com> <Bxo2F1.KoC@unx.sas.com>
  8. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  9. Organization: SAS Institute Inc.
  10. Lines: 38
  11. Keywords: strstr, SAS/C 6.0
  12. Originator: jamie@cdevil.unx.sas.com
  13. Nntp-Posting-Host: cdevil.unx.sas.com
  14.  
  15.  
  16. In article <Bxo2F1.KoC@unx.sas.com>, walker@twix.unx.sas.com (Doug Walker) writes:
  17. >
  18. >In article <Bxnw8z.CvD@unx.sas.com>, jamie@cdevil.unx.sas.com (James Cooper) writes:
  19. >|> A NULL character array has no size, so trying to access a member of it
  20. >|> at *all* is accessing "beyond the end" of it.
  21. >|>
  22. >|> I can put this in as an enhancement request for strstr(), but it can be
  23. >|> argued that the current behavior is correct, at least according to ANSI
  24. >|> specifications.  Just check for NULL yourself before calling it.
  25. >
  26. >He's not passing a NULL, he is passing a null string: i.e. "".
  27. >
  28. >This should work - the existing behavior is a bug.  It was present
  29. >in V5.0, too, by the way.  I doubt if this will make the patch
  30. >unless something else occurs to make us pull it back from QA.
  31.  
  32. I most humbly apologise to everyone following this thread... all I can
  33. claim is that it has been a long week... but that's just not good
  34. enough!
  35.  
  36. Anyway, the point is that strstr() **IS** an ANSI function, described in
  37. Section 4.11.5.7.  I don't know how I missed it...  :-( :-( :-( :-(
  38.  
  39. The point is, this has been found and fixed for the upcoming patch.  We
  40. had to pull the patch for something else after all, and this was easy
  41. enough to go ahead and add in.
  42.  
  43. Again, I'm sorry I spouted off without making **absolutely** sure I was
  44. saying the right things...  :-( :-( :-( :-(
  45.  
  46. -- 
  47. ---------------
  48. Jim Cooper
  49. (jamie@unx.sas.com)                             bix: jcooper
  50.  
  51. Any opinions expressed herein are mine (Mine, all mine!  Ha, ha, ha!),
  52. and not necessarily those of my employer.
  53.