On Nov 18 21:35, Gabriel Marcano wrote:
> cygcheck -svc causes a segfault on Windows 8.1 on line 1610 of cygcheck.cc,
> based on gdb output. I'm including some gdb output below that showcases this
> issue:
>
>
> 1610 strcat (osname, products[prod]);
> (gdb) list
> 1605 if (prod == PRODUCT_UNLICENSED)
> 1606 strcat (osname, "Unlicensed");
> 1607 else if (prod > PRODUCT_PROFESSIONAL_WMC)
> 1608 strcat (osname, "");
> 1609 else
> 1610 strcat (osname, products[prod]);
> 1611 }
> 1612 else
> 1613 {
> 1614 }
> (gdb) p prod
> $1 = 101
> (gdb) p sizeof(products)/sizeof(void*)
> $2 = 101
>
>
> 'products[prod]' in this case is accessing memory outside of the
> 'products' array. The odd thing is that a few lines back, the
> declaration of products includes 104 elements. I do not know why this
> discrepancy exists-- anyone have a clue?Yes. The size of the array is not what you think it is. The reason is that several commas are missing. Since I created this array, it's all my fault :} I didn't notice this because I'm using the Enterprise version which have a product value 4, which is pretty safe. I'm going to fix this in CVS today, but at the same time I'm also going to look for a solution to differ between Windows 8 and 8.1 (also 2012 vs. 2012R2) in the cygcheck output. Right now cygcheck just prints Windows 8. Thanks for the report, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgp51c2PDmf5h.pgp
Description: PGP signature

