]> Git Repo - VerusCoin.git/blame - src/gtest/test_jsonspirit.cpp
Check that E' points are actually in G2 by ensuring they are of order r.
[VerusCoin.git] / src / gtest / test_jsonspirit.cpp
CommitLineData
df3af446
S
1#include <gtest/gtest.h>
2
3#include "json/json_spirit_reader_template.h"
4
5using namespace json_spirit;
6
7// This test checks if we have fixed a stack overflow problem with json_spirit.
8// It was possible to try and create an unlimited number of nested compound elements.
9// Without the fix in json_spirit_reader_template.h, this test will segfault.
10TEST(json_spirit_tests, nested_input_segfault) {
11 std::vector<char> v (100000);
12 std::fill (v.begin(),v.end(), '[');
13 std::string s(v.begin(), v.end());
14 Value value;
15 bool b = json_spirit::read_string(s, value);
16 ASSERT_FALSE(b);
17}
This page took 0.039805 seconds and 4 git commands to generate.