[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Quote filename passed to $EDITOR

From: Ulrich Drepper <drepper_at_redhat.com>
Date: 2002-07-23 18:30:08 CEST

On Tue, 2002-07-23 at 01:08, Sander Striker wrote:
> No time to commit right now.
 
> /* Now, run the editor command line. */
> - cmd = apr_psprintf (pool, "%s %s", editor, tmpfile_native);
> + cmd = apr_psprintf (pool, "%s \"%s\"", editor, tmpfile_native);
> sys_err = system (cmd);
> if (sys_err != 0)

Why not use single quotes? The above just opens a hole for environment
variable expansion (unintentional or malicious).

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Received on Tue Jul 23 18:30:42 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.