Skip to content
Prev 33311 / 63424 Next

model.matrix memory problem (PR#13838)

Hi,

Excerpts from Torsten.Hothorn's message of Thu Jul 16 17:20:10 +0200 2009:
I've taken a look at this. The problem lies in lines 1784 - 1798 of
src/main/model.c. What happens is that 'k' overflows (signed
int). That means k is 0 after the loop an nc is set to 0. That means
the allocated model matrix 'x' is too small which results in the
observed segfault. 

I can provide a patch which checks for overflow and throws an error if
that is the desired behaviour.

Greetings,
Olaf Mersmann