Re: witekfl branch: quoting for FLITE_SYSTEM

Witold Filipczyk <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <20061228175027.GA26180@pldmachine>
On Wed, Dec 27, 2006 at 12:12:13AM +0200, Kalle Olavi Niemitalo wrote:
> commit e965d07055f5dd3e046469232e4b3986fb60cbaf
> speech: added flite - the alternative synthesis engine.
> 
> write_to_festival inserts backslashes in front of double-quotes
> and backslashes so that Festival can distinguish them from string
> delimiters.  Now if FLITE_SYSTEM is selected, the output instead
> goes to a loop in init_festival that adds quotes around the
> string and "flite -t " to the beginning and calls system().
> Unfortunately, the shell executed by system() recognizes more
> metacharacters in double-quoted strings than just double-quotes
> and backslashes.  Specifically, if the string contains `foo` or
> $(foo), then arbitrary programs can be executed.
> 
> It may also be possible that flite treats the entire line as an
> option if it begins with a dash.  (The quotes don't help here
> because the shell eats them.)  The documentation at
> <http://www.speech.cs.cmu.edu/flite/doc/flite_7.html#SEC16> does
> not say whether that is possible; I suppose someone should check
> the source code of flite.

Thanks for the report.
I'll use '' to quote.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.