From 779e5ce5aebe5b49eb4e73c04eaca9d10cda2dec Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 Jul 2019 14:47:01 +0200 Subject: [PATCH] DRNParser: Check if target state is valid --- src/storm-parsers/parser/DirectEncodingParser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storm-parsers/parser/DirectEncodingParser.cpp b/src/storm-parsers/parser/DirectEncodingParser.cpp index 5e4eee7ab..b4d590342 100644 --- a/src/storm-parsers/parser/DirectEncodingParser.cpp +++ b/src/storm-parsers/parser/DirectEncodingParser.cpp @@ -255,6 +255,7 @@ namespace storm { std::string valueStr = line.substr(posColon+2); ValueType value = valueParser.parseValue(valueStr); STORM_LOG_TRACE("Transition " << row << " -> " << target << ": " << value); + STORM_LOG_THROW(target < stateSize, storm::exceptions::WrongFormatException, "Target state " << target << " is greater than state size " << stateSize); builder.addNextValue(row, target, value); } }