mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-19 17:53:28 +00:00
Fixed crash that could occur if certain command line parameters are specified when there aren't sufficient permissions to open the db
This commit is contained in:
@@ -3960,7 +3960,7 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char **
|
|||||||
int ix;
|
int ix;
|
||||||
if ((ix=ILibString_IndexOf(param[ri], len, "=", 1)) > 2 && strncmp(param[ri], "--", 2)==0)
|
if ((ix=ILibString_IndexOf(param[ri], len, "=", 1)) > 2 && strncmp(param[ri], "--", 2)==0)
|
||||||
{
|
{
|
||||||
ILibSimpleDataStore_Cached(agentHost->masterDb, param[ri] + 2, ix - 2, param[ri] + ix + 1, len - (ix + 1));
|
if (agentHost->masterDb != NULL) { ILibSimpleDataStore_Cached(agentHost->masterDb, param[ri] + 2, ix - 2, param[ri] + ix + 1, len - (ix + 1)); }
|
||||||
++ixr;
|
++ixr;
|
||||||
}
|
}
|
||||||
if (strcmp("-finstall", param[ri]) == 0)
|
if (strcmp("-finstall", param[ri]) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user