Date: Sun, 24 Oct 2010 07:59:35 GMT From: Nicole Reid <root@cooltrainer.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/151677: [audio/cuetools] Fix filename handling for extras/cuetag.sh Message-ID: <201010240759.o9O7xZqI046944@www.freebsd.org> Resent-Message-ID: <201010240800.o9O80HKb060807@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 151677 >Category: ports >Synopsis: [audio/cuetools] Fix filename handling for extras/cuetag.sh >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 24 08:00:16 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Nicole Reid >Release: >Organization: >Environment: >Description: The extras/cuetag.sh script in this port doesn't escape filenames properly. There's an open bug for this on the project tracker (http://developer.berlios.de/bugs/?func=detailbug&bug_id=10401&group_id=2130) untouched for nearly four years, so a patch here in Ports is probably the only way we'll see a fix, as evidenced by the existing patch chasing a FLAC command syntax change. Also touch up a typo while we're here :) >How-To-Repeat: Try to run /usr/local/share/examples/cuetools/cuetag.sh on any cue sheet with a spaced file name. >Fix: --- cuetools.orig/files/patch-extras_cuetag.sh 2010-10-24 03:16:03.895004790 -0400 +++ cuetools/files/patch-extras_cuetag.sh 2010-10-24 03:20:58.637410871 -0400 @@ -1,5 +1,5 @@ ---- extras/cuetag.sh.orig 2008-11-28 00:41:26.000000000 +0300 -+++ extras/cuetag.sh 2008-11-28 00:41:32.000000000 +0300 +--- extras/cuetag.sh.orig 2006-02-14 19:10:02.000000000 -0500 ++++ extras/cuetag.sh 2010-10-24 03:20:01.349578391 -0400 @@ -18,7 +18,7 @@ { # FLAC tagging @@ -9,3 +9,47 @@ # Ogg Vorbis tagging # -w overwrites existing comments +@@ -63,7 +63,7 @@ + (for field in $fields; do + value="" + for conv in `eval echo \\$$field`; do +- value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file` ++ value=`$CUEPRINT -n $1 -t "$conv\n" "$cue_file"` + + if [ -n "$value" ]; then + echo "$field=$value" +@@ -96,7 +96,7 @@ + for field in $fields; do + value="" + for conv in `eval echo \\$$field`; do +- value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file` ++ value=`$CUEPRINT -n $1 -t "$conv\n" "$cue_file"` + + if [ -n "$value" ]; then + break +@@ -141,14 +141,14 @@ + cue_file=$1 + shift + +- ntrack=`cueprint -d '%N' $cue_file` ++ ntrack=`cueprint -d '%N' "$cue_file"` + trackno=1 + + if [ $# -ne $ntrack ]; then + echo "warning: number of files does not match number of tracks" + fi + +- for file in $@; do ++ for file in "$@"; do + case $file in + *.[Ff][Ll][Aa][Cc]) + vorbis $trackno "$file" +@@ -160,7 +160,7 @@ + id3 $trackno "$file" + ;; + *) +- echo "$file: uknown file type" ++ echo "$file: unknown file type" + ;; + esac + trackno=$(($trackno + 1)) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010240759.o9O7xZqI046944>