security: renamed classes
This commit is contained in:
parent
b826d2e41b
commit
5269e38ae2
4
Makefile
4
Makefile
|
@ -120,7 +120,7 @@ src/checkmemoryleak.o: src/checkmemoryleak.cpp src/checkmemoryleak.h src/tokeniz
|
|||
src/checkother.o: src/checkother.cpp src/checkother.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
|
||||
g++ $(CXXFLAGS) -c -o src/checkother.o src/checkother.cpp
|
||||
|
||||
src/checksecurity.o: src/checksecurity.cpp src/errorlogger.h src/settings.h src/token.h src/tokenize.h
|
||||
src/checksecurity.o: src/checksecurity.cpp src/checksecurity.h src/errorlogger.h src/settings.h src/token.h src/tokenize.h
|
||||
g++ $(CXXFLAGS) -c -o src/checksecurity.o src/checksecurity.cpp
|
||||
|
||||
src/checkstl.o: src/checkstl.cpp src/checkstl.h src/errorlogger.h src/settings.h src/token.h src/tokenize.h
|
||||
|
@ -204,7 +204,7 @@ test/testredundantif.o: test/testredundantif.cpp src/tokenize.h src/settings.h s
|
|||
test/testrunner.o: test/testrunner.cpp test/testsuite.h src/errorlogger.h src/settings.h
|
||||
g++ $(CXXFLAGS) -c -o test/testrunner.o test/testrunner.cpp
|
||||
|
||||
test/testsecurity.o: test/testsecurity.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h test/testsuite.h
|
||||
test/testsecurity.o: test/testsecurity.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checksecurity.h test/testsuite.h
|
||||
g++ $(CXXFLAGS) -c -o test/testsecurity.o test/testsecurity.cpp
|
||||
|
||||
test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/token.h
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/
|
||||
*/
|
||||
|
||||
#include "checkvalidate.h"
|
||||
#include "checksecurity.h"
|
||||
#include "errorlogger.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
|
||||
CheckValidate::CheckValidate(const Tokenizer *tokenizer, ErrorLogger *errorLogger)
|
||||
CheckSecurity::CheckSecurity(const Tokenizer *tokenizer, ErrorLogger *errorLogger)
|
||||
: _tokenizer(tokenizer), _errorLogger(errorLogger)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CheckValidate::~CheckValidate()
|
||||
CheckSecurity::~CheckSecurity()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ CheckValidate::~CheckValidate()
|
|||
/**
|
||||
* Check that there are input validation when reading number from FILE/stream
|
||||
*/
|
||||
void CheckValidate::readnum()
|
||||
void CheckSecurity::readnum()
|
||||
{
|
||||
const Token *tok = _tokenizer->tokens();
|
||||
while (tok)
|
||||
|
@ -80,7 +80,7 @@ void CheckValidate::readnum()
|
|||
* Read data from Form/GUI
|
||||
* Todo: This function must be more customizable to be usable
|
||||
*/
|
||||
void CheckValidate::gui()
|
||||
void CheckSecurity::gui()
|
||||
{
|
||||
// input control classes whose values are insecure..
|
||||
const char *inputclass[] = {"TEdit", 0};
|
||||
|
|
|
@ -19,19 +19,19 @@
|
|||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef checkvalidateH
|
||||
#define checkvalidateH
|
||||
#ifndef checksecurityH
|
||||
#define checksecurityH
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class ErrorLogger;
|
||||
class Token;
|
||||
class Tokenizer;
|
||||
|
||||
class CheckValidate
|
||||
class CheckSecurity
|
||||
{
|
||||
public:
|
||||
CheckValidate(const Tokenizer *tokenizer, ErrorLogger *errorLogger);
|
||||
~CheckValidate();
|
||||
CheckSecurity(const Tokenizer *tokenizer, ErrorLogger *errorLogger);
|
||||
~CheckSecurity();
|
||||
|
||||
/** Reading a number from a stream/FILE */
|
||||
void readnum();
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkvalidate.h"
|
||||
#include "../src/checksecurity.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
extern std::ostringstream errout;
|
||||
|
||||
class TestValidate : public TestFixture
|
||||
class TestSecurity : public TestFixture
|
||||
{
|
||||
public:
|
||||
TestValidate() : TestFixture("TestValidate")
|
||||
TestSecurity() : TestFixture("TestSecurity")
|
||||
{ }
|
||||
|
||||
private:
|
||||
|
@ -52,8 +52,8 @@ private:
|
|||
errout.str("");
|
||||
|
||||
// Check char variable usage..
|
||||
CheckValidate checkValidate(&tokenizer, this);
|
||||
checkValidate.readnum();
|
||||
CheckSecurity checkSecurity(&tokenizer, this);
|
||||
checkSecurity.readnum();
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,8 +83,8 @@ private:
|
|||
errout.str("");
|
||||
|
||||
// Check char variable usage..
|
||||
CheckValidate checkValidate(&tokenizer, this);
|
||||
checkValidate.gui();
|
||||
CheckSecurity checkSecurity(&tokenizer, this);
|
||||
checkSecurity.gui();
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,4 +100,4 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestValidate)
|
||||
REGISTER_TEST(TestSecurity)
|
||||
|
|
Loading…
Reference in New Issue