8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00

Implemented #7418: Reliability of plugin manager

This commit is contained in:
AlexPeshkoff 2022-12-09 18:39:02 +03:00
parent f162ebddd3
commit 3b52651b20

View File

@ -278,15 +278,29 @@ namespace
struct RegisteredPlugin
{
RegisteredPlugin(IPluginFactory* f, const char* nm, unsigned int t)
: factory(f), name(nm), type(t)
{ }
: factory(f), type(t)
{
if (nm)
{
if (strlen(nm) >= sizeof(name))
{
fatal_exception::raiseFmt("Size of plugin registration name should not exceed %d bytes",
sizeof(name) - 1);
}
strcpy(name, nm);
}
else
name[0] = 0;
}
RegisteredPlugin()
: factory(NULL), name(NULL), type(0)
{ }
: factory(NULL), type(0)
{
name[0] = 0;
}
IPluginFactory* factory;
const char* name;
char name[32];
unsigned int type;
};