[bug #19374] Insufficient quoting of PRUNEPATHS in updatedb

Sebastian Carlos <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #5, bug #19374 (project findutils):

Indeed, the patches don't work because they miss a critical unquoted variable,
"arg". 

The following patch should work:

-val=`echo $arg|sed 's/^[^=]*=\(.*\)/\1/'` || exit 71
+val=`echo "$arg"|sed 's/^[^=]*=\(.*\)/\1/'` || exit 71
[...]
- for p in $PRUNEPATHS; do
+ for p in "$PRUNEPATHS"; do
[...]
-  PRUNEREGEX=`echo $PRUNEPATHS|sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g'
-e 's,$,$\\\),'`
+   PRUNEREGEX=`echo "$PRUNEPATHS"|sed -e 's,^,\\\(^,' -e 's,
,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'`


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?19374>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
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.