1
0
Fork 0

DBG+GUI+BRIDGE: fixed all kinds of small errors (thanks to coverity!)

This commit is contained in:
mrexodia 2016-01-08 10:48:49 +01:00
parent 140f33441a
commit 152816542f
10 changed files with 27 additions and 13 deletions

View File

@ -272,6 +272,7 @@ private:
break;
case '\t':
escaped += "\\t";
break;
default:
escaped += ch;
}

View File

@ -5,9 +5,11 @@
#include "memory.h"
#include "function.h"
ControlFlowAnalysis::ControlFlowAnalysis(duint base, duint size, bool exceptionDirectory) : Analysis(base, size)
ControlFlowAnalysis::ControlFlowAnalysis(duint base, duint size, bool exceptionDirectory)
: Analysis(base, size),
_functionInfoSize(0),
_functionInfoData(nullptr)
{
_functionInfoData = nullptr;
#ifdef _WIN64
// This will only be valid if the address range is within a loaded module
_moduleBase = ModBaseFromAddr(base);

View File

@ -5,9 +5,11 @@
#include "console.h"
#include "function.h"
ExceptionDirectoryAnalysis::ExceptionDirectoryAnalysis(duint base, duint size) : Analysis(base, size)
ExceptionDirectoryAnalysis::ExceptionDirectoryAnalysis(duint base, duint size)
: Analysis(base, size),
_functionInfoSize(0),
_functionInfoData(nullptr)
{
_functionInfoData = nullptr;
#ifdef _WIN64
// This will only be valid if the address range is within a loaded module
_moduleBase = ModBaseFromAddr(base);

View File

@ -347,7 +347,7 @@ void ModGetList(std::vector<MODINFO> & list)
list.push_back(mod.second);
}
bool ModAddImportToModule(duint Base, MODIMPORTINFO importInfo)
bool ModAddImportToModule(duint Base, const MODIMPORTINFO & importInfo)
{
SHARED_ACQUIRE(LockModules);
@ -360,8 +360,8 @@ bool ModAddImportToModule(duint Base, MODIMPORTINFO importInfo)
return false;
// Search in Import Vector
std::vector<MODIMPORTINFO>* pImports = &(module->imports);
auto it = std::find_if(pImports->begin(), pImports->end(), [&importInfo](MODIMPORTINFO currentImportInfo)->bool
auto pImports = &(module->imports);
auto it = std::find_if(pImports->begin(), pImports->end(), [importInfo](const MODIMPORTINFO & currentImportInfo)->bool
{
return (importInfo.addr == currentImportInfo.addr);
});

View File

@ -47,4 +47,4 @@ duint ModEntryFromAddr(duint Address);
int ModPathFromAddr(duint Address, char* Path, int Size);
int ModPathFromName(const char* Module, char* Path, int Size);
void ModGetList(std::vector<MODINFO> & list);
bool ModAddImportToModule(duint Base, MODIMPORTINFO importInfo);
bool ModAddImportToModule(duint Base, const MODIMPORTINFO & importInfo);

View File

@ -62,7 +62,8 @@ public:
}
TokenValue() :
size(0)
size(0),
value(0)
{
}
};

View File

@ -1,7 +1,12 @@
#include "WordEditDialog.h"
#include "ui_WordEditDialog.h"
WordEditDialog::WordEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::WordEditDialog)
WordEditDialog::WordEditDialog(QWidget* parent)
: QDialog(parent),
ui(new Ui::WordEditDialog),
mHexLineEditPos(0),
mSignedEditPos(0),
mUnsignedEditPos(0)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)

View File

@ -2,7 +2,10 @@
#include <QFile>
#include "Entropy.h"
QEntropyView::QEntropyView(QWidget* parent) : QGraphicsView(parent)
QEntropyView::QEntropyView(QWidget* parent)
: QGraphicsView(parent),
mRect(QRectF()),
mPenSize(1)
{
mScene = new QGraphicsScene(this);
}

View File

@ -8,7 +8,8 @@
#include "Bridge.h"
UpdateChecker::UpdateChecker(QWidget* parent)
: QNetworkAccessManager(parent)
: QNetworkAccessManager(parent),
mParent(parent)
{
connect(this, SIGNAL(finished(QNetworkReply*)), this, SLOT(finishedSlot(QNetworkReply*)));
}

View File

@ -15,7 +15,6 @@ private slots:
private:
QWidget* mParent;
};
#endif // UPDATECHECKER_H