delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/04/07:58:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 4 Nov 2003 07:57:53 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
Message-ID: <20031104125753.GC31267@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3 DOT 0 DOT 5 DOT 32 DOT 20031030202558 DOT 00828400 AT incoming DOT verizon DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 20031029214604 DOT 0082b8c0 AT incoming DOT verizon DOT net> <200310291905 DOT h9TJ5eG5028353 AT pion DOT ivic DOT ve> <3 DOT 0 DOT 5 DOT 32 DOT 20031029214604 DOT 0082b8c0 AT incoming DOT verizon DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 20031030202558 DOT 00828400 AT incoming DOT verizon DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 20031031190541 DOT 00826670 AT incoming DOT verizon DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 20031102094314 DOT 00839710 AT incoming DOT verizon DOT net> <20031103163115 DOT GH18706 AT cygbert DOT vinschen DOT de> <20031103183956 DOT GA223527 AT Worldnet> <3 DOT 0 DOT 5 DOT 32 DOT 20031103211959 DOT 00829450 AT incoming DOT verizon DOT net>
Mime-Version: 1.0
In-Reply-To: <3.0.5.32.20031103211959.00829450@incoming.verizon.net>
User-Agent: Mutt/1.4.1i

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019