home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15808 < prev    next >
Encoding:
Text File  |  1992-11-14  |  1.6 KB  |  41 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!concert!sas!mozart.unx.sas.com!walker
  3. From: walker@twix.unx.sas.com (Doug Walker)
  4. Subject: Re: Bug in SAS/C 6.0 library : strstr ()
  5. Originator: walker@twix.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <Bxo2F1.KoC@unx.sas.com>
  8. Date: Fri, 13 Nov 1992 18:09:00 GMT
  9. References:  <hadig.721653082@rama> <Bxnw8z.CvD@unx.sas.com>
  10. Nntp-Posting-Host: twix.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Keywords: strstr, SAS/C 6.0
  13. Lines: 26
  14.  
  15.  
  16. In article <Bxnw8z.CvD@unx.sas.com>, jamie@cdevil.unx.sas.com (James Cooper) writes:
  17. |> A NULL character array has no size, so trying to access a member of it
  18. |> at *all* is accessing "beyond the end" of it.
  19. |> 
  20. |> I can put this in as an enhancement request for strstr(), but it can be
  21. |> argued that the current behavior is correct, at least according to ANSI
  22. |> specifications.  Just check for NULL yourself before calling it.
  23.  
  24. He's not passing a NULL, he is passing a null string: i.e. "".
  25.  
  26. This should work - the existing behavior is a bug.  It was present
  27. in V5.0, too, by the way.  I doubt if this will make the patch
  28. unless something else occurs to make us pull it back from QA.
  29.  
  30. |> Jim Cooper
  31.  
  32. -- 
  33.   *****
  34. =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
  35.  *|. o.| ||                                          1200/2400/9600 Dual
  36.   | o  |//     For all you do, this bug's for you!
  37.   ====== 
  38. usenet: walker@unx.sas.com                            bix: djwalker 
  39. Any opinions expressed are mine, not those of SAS Institute, Inc.
  40.  
  41.