I am stuck on an assignment that consists in finding a vulnerability in std::unordered_set
that simply inserts some strings in an unordered_set<string>
in a cycle:
for (const auto& user : users_list) {
users.insert(user);
}
See full source code for details.
File compiled on UBUNTU as follows:
g++ -std=c++14 -O2 -Wall run.cpp -o run
The task is to provide an input that would make this program return a non zero status code.
Any ideas where to look? The hint is that there is something with the default hashing function and the fact that the program is compiled on ubuntu.