1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +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:
Bryan Roe
2020-04-28 01:44:11 -07:00
parent 12347a8eb4
commit 7b339e08e0

View File

@@ -3960,7 +3960,7 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char **
int ix;
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;
}
if (strcmp("-finstall", param[ri]) == 0)