klocwork: fix risk issues

This commit is contained in:
Hong, Yang A
2022-05-31 06:30:18 +00:00
committed by Konstantinos Margaritis
parent 75dbedeebe
commit 978105a4c0
15 changed files with 61 additions and 10 deletions

View File

@@ -561,6 +561,10 @@ bool handleMixedPrefixCliche(const NGHolder &h, RoseGraph &g, RoseVertex v,
DEBUG_PRINTF("woot?\n");
shared_ptr<NGHolder> h_new = make_shared<NGHolder>();
if (!h_new) {
assert(0);
throw std::bad_alloc();
}
unordered_map<NFAVertex, NFAVertex> rhs_map;
vector<NFAVertex> exits_vec;
insert(&exits_vec, exits_vec.end(), exits);