Diagnose unsupported uses of `backname' helper function.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 18 Oct 2008 08:08:15 +0000 (10:08 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 18 Oct 2008 08:08:15 +0000 (10:08 +0200)
* automake.in (backname): Error out if the path points outside
the directory it started in.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
automake.in

index 946aef7..45c8e3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Diagnose unsupported uses of `backname' helper function.
+       * automake.in (backname): Error out if the path points outside
+       the directory it started in.
+
 2008-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Nicer 'make dist' output.
index 4e53484..335fe13 100755 (executable)
@@ -1053,7 +1053,8 @@ sub backname ($)
        next if $_ eq '.' || $_ eq '';
        if ($_ eq '..')
        {
-           pop @res;
+           pop @res
+             or prog_error ("trying to reverse path `$file' pointing outside tree");
        }
        else
        {