CORRELATIONS: Fix crash with separate sets of row and column variables.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 7 Apr 2013 17:06:23 +0000 (10:06 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 7 Apr 2013 17:07:37 +0000 (10:07 -0700)
commit501dedaf37c6d636c8ae2f03fd59d42be2a53a7c
treecd219c0b9299fd5a07fd09e3921e55df4b93e695
parent5445e00627b4ca89f00d84b6f3b61c8e15e9f5f1
CORRELATIONS: Fix crash with separate sets of row and column variables.

When WITH is specified, the column variables start at offset corr->n_vars1
within corr->vars.  The calculation previously used here was incorrect and
caused an access beyond the end of the corr->vars array.

The code would be clearer if there were separate row_vars and col_vars
arrays, but that would be a larger change.

Bug #38661.
Reported by William Rogers.
src/language/stats/correlations.c
tests/language/stats/correlations.at