Re: setup 2.887 release candidate - please test

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: setup 2.887 release candidate - please test

Ken Brown-6
On 2/6/2018 10:04 AM, Jon Turney wrote:
>
> A new setup release candidate is available at:
>
>    https://cygwin.com/setup/setup-2.887.x86_64.exe (64 bit version)
>    https://cygwin.com/setup/setup-2.887.x86.exe    (32 bit version)
>
> Please test and report any problems here.

This crashes in ConfirmPage::OnActivate() if a source package is being
installed.  The problem is that 'pkg' is null, but it is dereferenced in
confirm.cc:99.  The attached patch fixes this in the laziest possible
way, but I'm not sure it's the best fix.  Maybe we should check whether
'pkg' is NULL (both times it's defined) and throw an exception if so
unless we're installing a source package.

Alternatively, maybe we should just make sure it's non-NULL (both times)
before dereferencing it.  After all, we're only using 'pkg' to decide
whether to say "automatically added", so if it's NULL, it might not be
worth worrying about why.

Ken


0001-Avoid-crash-if-a-source-package-is-installed.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setup 2.887 release candidate - please test

Jon TURNEY
On 14/02/2018 23:02, Ken Brown wrote:

> On 2/6/2018 10:04 AM, Jon Turney wrote:
>>
>> A new setup release candidate is available at:
>>
>>    https://cygwin.com/setup/setup-2.887.x86_64.exe (64 bit version)
>>    https://cygwin.com/setup/setup-2.887.x86.exe    (32 bit version)
>>
>> Please test and report any problems here.
>
> This crashes in ConfirmPage::OnActivate() if a source package is being
> installed.  The problem is that 'pkg' is null, but it is dereferenced in
> confirm.cc:99.  The attached patch fixes this in the laziest possible
> way, but I'm not sure it's the best fix.  Maybe we should check whether
> 'pkg' is NULL (both times it's defined) and throw an exception if so
> unless we're installing a source package.
>
> Alternatively, maybe we should just make sure it's non-NULL (both times)
> before dereferencing it.  After all, we're only using 'pkg' to decide
> whether to say "automatically added", so if it's NULL, it might not be
> worth worrying about why.

Thanks. I also came across this, but you beat me to sending a patch :)