mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-04 17:43:45 +00:00
Fixed bug where if a proxy isn't set, it could cause a segfault on FreeBSD
This commit is contained in:
@@ -462,7 +462,7 @@ int MeshAgent_GetSystemProxy(MeshAgentHostContainer *agent, char *buffer, size_t
|
||||
{
|
||||
duk_size_t proxyLen;
|
||||
char *proxy = (char*)duk_get_lstring(agent->meshCoreCtx, -1, &proxyLen);
|
||||
strcpy_s(buffer, bufferSize, proxy);
|
||||
if (proxy != NULL && proxyLen > 0) { strcpy_s(buffer, bufferSize, proxy); }
|
||||
retVal = (int)proxyLen;
|
||||
}
|
||||
duk_pop(agent->meshCoreCtx);
|
||||
|
||||
Reference in New Issue
Block a user