From tlumley@u.washington.edu  Fri Feb 16 16:54:23 2001
From: tlumley@u.washington.edu (tlumley@u.washington.edu)
Date: Fri, 16 Feb 2001 17:54:23 +0100 (MET)
Subject: [Rd] print.matrix segfaults if rowlab vector too short (PR#850)
Message-ID: <200102161654.RAA17826@pubhealth.ku.dk>

On Fri, 16 Feb 2001, Thomas Lumley wrote:

> On Fri, 16 Feb 2001 pdenis2@home.com wrote:
>
> > print.matrix(x) segfaults if the vector supplied to 'rowlab' is
> > *shorter* than nrow(x):
> >
>
> Ok, the cause is the obvious one: there is no check for the length of
> rowlab in print[type]Matrix, nor in formatString. formatString happily
> wanders along the vector and falls off the end.
>
> I'm going to fix it in formatString, we may also want to fix it higher up.

No I'm not: formatString gets a C vector of strings, not an R vector. It
has to be fixed higher up.

	-thomas



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] print.matrix segfaults if rowlab vector too short (PR#850)
tlumley@u.washington.edu