mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-06 06:09:22 +00:00
Check the argument count before indexing config comment log args
A '# do:log.add_output=debug' line read args[1] past the end of the vector.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include "test/helpers/test_fixture.h"
|
||||
|
||||
class TestSetup : public test_fixture {
|
||||
CPPUNIT_TEST_SUITE(TestSetup);
|
||||
|
||||
CPPUNIT_TEST(test_config_comment_log_add_output);
|
||||
CPPUNIT_TEST(test_config_comment_log_add_output_no_args);
|
||||
CPPUNIT_TEST(test_config_comment_log_add_output_one_arg);
|
||||
CPPUNIT_TEST(test_config_comment_log_add_output_too_many_args);
|
||||
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void test_config_comment_log_add_output();
|
||||
void test_config_comment_log_add_output_no_args();
|
||||
void test_config_comment_log_add_output_one_arg();
|
||||
void test_config_comment_log_add_output_too_many_args();
|
||||
};
|
||||
Reference in New Issue
Block a user