DBG: resolved a potential crash when calling cbPlugin functions
This commit is contained in:
parent
6f667ae955
commit
a52749002b
|
@ -1,6 +1,7 @@
|
||||||
#include "plugin_loader.h"
|
#include "plugin_loader.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
|
#include "memory.h"
|
||||||
#include "x64_dbg.h"
|
#include "x64_dbg.h"
|
||||||
|
|
||||||
static std::vector<PLUG_DATA> pluginList;
|
static std::vector<PLUG_DATA> pluginList;
|
||||||
|
@ -249,8 +250,9 @@ void plugincbcall(CBTYPE cbType, void* callbackInfo)
|
||||||
{
|
{
|
||||||
if(pluginCallbackList.at(i).cbType == cbType)
|
if(pluginCallbackList.at(i).cbType == cbType)
|
||||||
{
|
{
|
||||||
//TODO: handle exceptions
|
CBPLUGIN cbPlugin = pluginCallbackList.at(i).cbPlugin;
|
||||||
pluginCallbackList.at(i).cbPlugin(cbType, callbackInfo);
|
if(memisvalidreadptr(GetCurrentProcess(), (uint)cbPlugin))
|
||||||
|
cbPlugin(cbType, callbackInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue