mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-05 13:49:21 +00:00
Bound JSON-RPC input by size and nesting depth
Enforce the nesting bound in one parse, capping allocation by depth, not input size.
This commit is contained in:
@@ -9,6 +9,8 @@ class TestJsonrpc : public test_fixture {
|
||||
|
||||
CPPUNIT_TEST(test_basics);
|
||||
CPPUNIT_TEST(test_response_size_limit);
|
||||
CPPUNIT_TEST(test_depth_limit);
|
||||
CPPUNIT_TEST(test_size_limit);
|
||||
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
@@ -18,6 +20,8 @@ public:
|
||||
|
||||
void test_basics();
|
||||
void test_response_size_limit();
|
||||
void test_depth_limit();
|
||||
void test_size_limit();
|
||||
|
||||
private:
|
||||
std::unique_ptr<TestMainThread> m_test_main_thread;
|
||||
|
||||
Reference in New Issue
Block a user