Module Name: src Committed By: njoly Date: Tue Mar 12 13:08:00 UTC 2013
Modified Files: src/distrib/sets: getdirs.awk Log Message: Error out if a path has a trailing slash, which makes awk enter an infinite loop while creating set lists. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/getdirs.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/getdirs.awk diff -u src/distrib/sets/getdirs.awk:1.5 src/distrib/sets/getdirs.awk:1.6 --- src/distrib/sets/getdirs.awk:1.5 Wed Feb 8 16:51:09 2012 +++ src/distrib/sets/getdirs.awk Tue Mar 12 13:08:00 2013 @@ -1,4 +1,4 @@ -# $NetBSD: getdirs.awk,v 1.5 2012/02/08 16:51:09 njoly Exp $ +# $NetBSD: getdirs.awk,v 1.6 2013/03/12 13:08:00 njoly Exp $ # # Copyright (c) 2002 The NetBSD Foundation, Inc. # All rights reserved. @@ -59,6 +59,15 @@ function dirname(file) \ exit 1 } +# error if path has a trailing slash +# +/\/$/ \ +{ + print "Unsupported path with trailing slash:" >"/dev/stderr" + print >"/dev/stderr" + exit 1 +} + # all other lines are parsed # {