Mail Archives: cygwin/2003/11/04/07:58:06
On Mon, Nov 03, 2003 at 09:19:59PM -0500, Pierre A. Humblet wrote:
>At 08:06 PM 11/3/2003 +0100, Corinna Vinschen wrote:
>>On Mon, Nov 03, 2003 at 01:39:56PM -0500, Pierre A. Humblet wrote:
>>> On Mon, Nov 03, 2003 at 05:31:15PM +0100, Corinna Vinschen wrote:
>>> >
>>> > I see. I'll create a patch.
>>>
>>> I started one already, must still compile and test.
>>> Let me know if you proceed on your side.
>>
>>I have a patch ready and it seems to work fine(tm). Would you mind
>>to give it a try on 95? Patch below.
>
>Turns out your patch is identical to mine (there is no need to
>initialize protolen), and it worked on Win95, but a few things
>trouble me in the reused code:
>
>1) The test "IsBadReadPtr (src->s_proto ..." will unduly fail on Win95
> if the 16 lsb of the first alias address are the 16 msb of a readable
> memory address. I don't see why that's impossible. If would safer
> to have a wincap entry, or (horror !), testing wincap.osname ().
In my testing, I never saw that, and we've never gotten a bug report to
that effect, IIRC. I thought that the double check of this pointer made
it pretty safe.
>2) The test "&& !IsBadReadPtr (((pservent *) src) " should never fail
> when it is reached, but should it fail, s_proto would be assigned an
> invalid address and the program would crash. So if that test is kept
> it should be part of a if .. else if .. (leaving s_proto NULL).
>3) Strictly speaking, we should use IsBadStringPtr..
Yes, and strictly speaking, we should be checking all of the fields in
this structure.
I'll check in an "IsStringPtr" patch.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -