[patch] Fix a couple of null-derefs in setup.exe

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Fri Sep 18 14:05:00 GMT 2009


On Fri, Sep 18, 2009 at 12:47:35PM +0100, Dave Korn wrote:
>
>    Hi gang,
>
>  There are a couple of places where setup can bomb if you blow away your
>stored settings (cached mirror list or last mirror), as it gets a null pointer
>on trying to read them back; both strtok and the std::string(const char *)
>ctor blow up on this.  Attached patch trivially protects against both.
>
>	* site.cc (get_site_list): Use empty string if user settings
>	return NULL pointer for cached mirrors list.
>	(SiteSetting::getSavedSites): Do nothing if user settings return
>	NULL pointer for last mirror URL.
>
>  Ok?

Yes.  This was the bug that I referred to in the cygwin list.  It hit me
at one point in a clean installation and I have been meaning to go back
to debug it.

Please check this in, Dave.

There is one other minor problem in that the maximized screen settings stay
around when  you do a <Back.  I thought I'd fixed that but it still seems
to be an issue.  I'll fix that for real soon.

cgf



More information about the Cygwin-apps mailing list