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