[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: <cmpilato_at_collab.net>
Date: 2002-07-23 18:37:56 CEST

> Why not use a replacement for system that doesn't run through a shell in the
> first place, fork()/execve().

We've been here. Let it die.

> > /* 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).

Windows doesn't recognize single-quotes as an arg wrapper.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 23 18:39:46 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.