From 1954e73dbf4e4984d33a45d6ce05ee5aecb84714 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 11 Nov 2008 19:07:34 +0000 Subject: Throw an exception if SCAN name is malformed or empty --- src/utils/scan_name.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utils/scan_name.cpp') diff --git a/src/utils/scan_name.cpp b/src/utils/scan_name.cpp index e32110740..f5a1a9245 100644 --- a/src/utils/scan_name.cpp +++ b/src/utils/scan_name.cpp @@ -47,6 +47,9 @@ SCAN_Name::SCAN_Name(const std::string& algo_spec, m_provider = provider; name = parse_and_deref_aliases(algo_spec); + + if(name.size() == 0) + throw Decoding_Error("Bad SCAN name " + algo_spec); } SCAN_Name SCAN_Name::arg(u32bit i) const -- cgit v1.2.3