bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #19374] Insufficient quoting of PRUNEPATHS in updatedb


From: James Youngman
Subject: Re: [bug #19374] Insufficient quoting of PRUNEPATHS in updatedb
Date: Sat, 21 Feb 2009 22:42:52 +0000

On Mon, Feb 9, 2009 at 9:22 AM, anonymous <address@hidden> wrote:
>
> Follow-up Comment #2, bug #19374 (project findutils):
>
> Here is a patch:
>
> --- updatedb.org        2009-01-27 13:29:28.575086300 +0100
> +++ updatedb    2009-02-09 10:19:41.132505500 +0100
> @@ -163,7 +163,7 @@
>  # Trailing slashes result in regex items that are never matched, which
>  # is not what the user will expect.   Therefore we now reject such
>  # constructs.
> -for p in $PRUNEPATHS; do
> +for p in "$PRUNEPATHS"; do
>     case "$p" in
>        /*/)   echo "$0: $p: pruned paths should not contain trailing
> slashes" >&2
>               exit 1
> @@ -172,7 +172,7 @@
>
>  # The same, in the form of a regex that find can use.
>  test -z "$PRUNEREGEX" &&
> -  PRUNEREGEX=`echo $PRUNEPATHS|sed -e 's,^,\(^,' -e 's, ,$\)\|\(^,g' -e
> 's,$,$\),'`
> +  PRUNEREGEX=`echo "$PRUNEPATHS"|sed -e 's,^,\(^,' -e 's, ,$\)\|\(^,g' -e
> 's,$,$\),'`

This looks like a useful patch, would you please mail it to
address@hidden and address@hidden as a git patch
against the current source tree (see
https://savannah.gnu.org/git/?group=findutils) and with updates to the
ChangeLog and NEWS files?

Thanks,
James.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]