From ripley at stats.ox.ac.uk  Mon Jan 14 18:50:23 2008
From: ripley at stats.ox.ac.uk (ripley at stats.ox.ac.uk)
Date: Mon, 14 Jan 2008 18:50:23 +0100 (CET)
Subject: [Rd] %s in filename when opening device causes crash (PR#10571)
Message-ID: <20080114175023.B5B242834612@mail.pubhealth.ku.dk>

On Mon, 14 Jan 2008, richard.cotton at hsl.gov.uk wrote:

> Full_Name: Richard Cotton
> Version: 2.6.1
> OS: Windows XP (32bit)
> Submission from: (NULL) (193.119.236.82)
>
>
> Using %s in a filename when opening a device causes R to crash, e.g.,
>
> pdf("foo%s.pdf")
> win.metafile("foo%s.wmf")
> postscript("foo%s.ps")

Do you have a workaround for this?  Since that is done at C level, we 
can't easily trap this (especially on Windows), and the list of possible 
errors that might cause a crash is rather long.

It has been considered as a vulnerability, but there seems no simple 
solution.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] %s in filename when opening device causes crash (PR#10571)
ripley at stats.ox.ac.uk