home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 654 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

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