1
0
Fork 0

DBG: resolved a potential crash when calling cbPlugin functions

This commit is contained in:
Mr. eXoDia 2014-08-15 20:01:29 +02:00
parent 6f667ae955
commit a52749002b
1 changed files with 4 additions and 2 deletions

View File

@ -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);
} }
} }
} }