From ac82bded6b2bdaf1e04b6357415c9f5ce04063dd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 8 Oct 2017 21:16:33 +0300 Subject: Fix crashing on empty installation directory name --- build2/install/rule.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'build2/install/rule.cxx') diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx index f764363..75de96f 100644 --- a/build2/install/rule.cxx +++ b/build2/install/rule.cxx @@ -340,6 +340,9 @@ namespace build2 // installation directory name, e.g., bin, sbin, lib, etc. Look it // up and recurse. // + if (d.empty ()) + fail << "empty installation directory name"; + const string& sn (*d.begin ()); const string var ("install." + sn); if (const dir_path* dn = lookup_install (s, var)) -- cgit v1.1