Skip to content
Prev 5086 / 63424 Next

print.matrix segfaults if rowlab vector too short (PR#850)

print.matrix(x) segfaults if the vector supplied to 'rowlab' is
*shorter* than nrow(x):
_
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status
major    1
minor    2.1
year     2001
month    01
day      15
language R
[installed from RPM]
[,1] [,2]
[1,]    1    3
[2,]    2    4
[,1] [,2]
[1,]    1    3
[2,]    2    4
[,1] [,2]
a    1    3
b    2    4
[,1] [,2]
a    1    3
b    2    4                                             [OK, ignores
extra labels ...]
Segmentation fault (core dumped)

Similar behavior for 'collab' ...



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._