-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
initval() does simtime = val[0] right after parsing without checking if val is empty. Pass it "[]" or garbage string and it's instant UB/segfault.
vector<double> val = parser(f);
simtime = val[0]; // boom
val.erase(val.begin()); // double boom
read_FM and read_SM in the same file already do if(inval.empty()) return inval; so someone knew about this. initval just got skipped.
concoredocker.hpp handles it fine (if (!val.empty())). Python side too. Only concore.hpp is broken.
not hard to fix, just add the empty check before accessing [0]. but its a crash in core library code so kinda important
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels