delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/27/15:47:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <028301c0b6fe$de309c50$3c5350d8@bluesguitar.org>
From: "Matthew Smith" <matts AT bluesguitar DOT org>
To: "Cygwin" <cygwin AT sources DOT redhat DOT com>
Subject: Debugging setup.exe
Date: Tue, 27 Mar 2001 14:45:32 -0600
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

I thought I'd take a look at the setup.exe source, to try and figure out why
setup crashes when you click outside of the listing of package choices.
setup seems to crash in the list_click callback function, in choose.cc.  The
function looks like this:

static LRESULT CALLBACK
list_click (HWND hwnd, BOOL dblclk, int x, int y, UINT hitCode)


It's crashing because it's passing an array index that's out of bounds.
"Sounds easy to fix" I said to myself.  However, I ran into some
strangeness.  There is a local integer 'r' declared in this callback.  Then
there is the following code in the function:

r = (y + ROW_MARGIN/2) / row_height;

if (r < 0 || r >= npackages)
  return 0;


The odd thing is, if I step through this function in GDB, the local variable
'r' will not show up in the local variable list, so I have no idea what it's
value is.  Any ideas here?

cheers,
-Matt Smith



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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