home *** CD-ROM | disk | FTP | other *** search
- Path: hearst.acc.Virginia.EDU!adastra!mbs
- Newsgroups: comp.sys.amiga.programmer
- From: mbs@adastra.cvl.va.us (Michael B. Smith)
- Subject: Re: AS225 daemon launch?
- References: <19960106.7CB5338.12AAC@sdcc8.ucsd.edu> <mbs.46wn@adastra.cvl.va.us> <4crhn9$man@serpens.rhein.de>
- X-NewsReader: GRn 3.0b24 December 30, 1995
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- Message-ID: <mbs.4729@adastra.cvl.va.us>
- Date: Tue, 9 Jan 96 23:26:24 EDT
- Organization: Only if you insist...
-
- In article <4crhn9$man@serpens.rhein.de> mlelstv@serpens.rhein.de (Michael van Elst) writes:
- > mbs@adastra.cvl.va.us (Michael B. Smith) writes:
- > >socket.library makes 3 validation checks on the socket pointer
- > >before allowing s_inherit() to succeed. It's not infallible, but
- > >it's very unlikely that you'll be able to pick a correct value
- > >to "fool" s_inherit().
- >
- > Well... I just tried with the value (sockptr + 12345) which should
- > be an invalid pointer. s_inherit() returned 0, but the socket
- > descriptor was not usuable. A subsequent s_inherit with just sockptr
- > returned a -1.
- >
- > Seems that the validation checks have a bug.
-
- Cool!
-
- Actually, the validation checks worked just fine, the error flag
- just didn't get set, and it returned the default value. The
- stack did the sane thing, but the API is a bit off. Good catch,
- that needs fixing.
-
- s_inherit() is defined as a "not safe" thing to do. I'm trying
- to consider if other API calls are reasonably subject to this
- issue.
- --
- // Michael B. Smith
- \X/ mbs@adastra.cvl.va.us
-