mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-05 21:59:21 +00:00
Reject out-of-range RPC values instead of narrowing them silently.
Guards choke group max, set-port and info-hash length; parsing now uses std::from_chars.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include "test/helpers/test_fixture.h"
|
||||
|
||||
class TestParse : public test_fixture {
|
||||
CPPUNIT_TEST_SUITE(TestParse);
|
||||
|
||||
CPPUNIT_TEST(test_whole_value_in_range);
|
||||
CPPUNIT_TEST(test_whole_value_out_of_range);
|
||||
CPPUNIT_TEST(test_whole_value_bases);
|
||||
CPPUNIT_TEST(test_whole_value_prefixes);
|
||||
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void test_whole_value_in_range();
|
||||
void test_whole_value_out_of_range();
|
||||
void test_whole_value_bases();
|
||||
void test_whole_value_prefixes();
|
||||
};
|
||||
Reference in New Issue
Block a user