aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-13 15:32:43 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-13 16:03:31 +0200
commit568a099c889e7ccc5a49b15575078e99acf8bc2f (patch)
tree92981c6f2c41a7801197e5f1fe8c5e9444fc90f9 /src/libutil
parent6d97d816565505606792050131b5d4d7fca33245 (diff)
canonPath(): Check against empty paths
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index a640a64c7..0bd51afd1 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -96,6 +96,8 @@ Path absPath(Path path, Path dir)
Path canonPath(const Path & path, bool resolveSymlinks)
{
+ assert(path != "");
+
string s;
if (path[0] != '/')