]> git.donarmstrong.com Git - debhelper.git/commitdiff
avoid expanding shell variables in sed string
authorJoey Hess <joey@kitenet.net>
Thu, 16 Feb 2012 22:57:06 +0000 (18:57 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 21 Feb 2012 23:06:35 +0000 (19:06 -0400)
Debian/Debhelper/Dh_Lib.pm
debian/changelog

index e0a274a4dd78192fb7893a249a85930cf094a2cf..7073aa4ec92c29cea395a439a2af3c55d04a3201 100644 (file)
@@ -533,14 +533,14 @@ sub autoscript {
           && !compat(5)) {
                # Add fragments to top so they run in reverse order when removing.
                complex_doit("echo \"# Automatically added by ".basename($0)."\"> $outfile.new");
-               complex_doit("sed \"$sed\" $infile >> $outfile.new");
+               complex_doit("sed '$sed' $infile >> $outfile.new");
                complex_doit("echo '# End automatically added section' >> $outfile.new");
                complex_doit("cat $outfile >> $outfile.new");
                complex_doit("mv $outfile.new $outfile");
        }
        else {
                complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile");
-               complex_doit("sed \"$sed\" $infile >> $outfile");
+               complex_doit("sed '$sed' $infile >> $outfile");
                complex_doit("echo '# End automatically added section' >> $outfile");
        }
 }
index 13bdc7f5f1f41e330f7056f349aaa57c6f57d21e..81ccb07af72b13bc432f9673c2f2810bde11f142 100644 (file)
@@ -3,6 +3,8 @@ debhelper (9.20120116) UNRELEASED; urgency=low
   * dh_auto_install: Set AM_UPDATE_INFO_DIR=no to avoid automake
     generating an info dir file. Closes: #634741
   * dh_install: Man page clarification. Closes: #659635
+  * Avoid expanding shell metacharacters in sed call in autoscript().
+    Closes: #660794
 
  -- Joey Hess <joeyh@debian.org>  Wed, 08 Feb 2012 13:46:13 -0400