Add a test-suite based on CVE vulnerabilities

This commit is contained in:
Daniel Marjamäki 2018-10-04 17:24:39 +02:00
parent c98c7a2ebf
commit 72e6bbaa26
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
// Reduced source code. Inspired by this fix:
// https://github.com/EOSIO/eos/pull/4112/commits/ef62761c5e388880e8bb1bb41e8b512a5187f255
#include <set>
class C
{
std::set<int> typedefs;
bool is_type(int type) const
{
if (typedefs.find(type) != typedefs.end())
return is_type(type); // BUG: endless recursion
return false;
}
};