Fix strlcpy off-by-one error

WORKER_LENGTH + 1 is too large. Fixing this has no impact on the string
that is ultimately copied, as it's impossible for the source string to
be any larger to begin with.
pull/1938/head
Jason Petersen 2016-03-23 17:34:34 -06:00
parent 5f5ad55f0e
commit ade2d5bd77
1 changed files with 2 additions and 2 deletions

View File

@ -723,8 +723,8 @@ ParseWorkerNodeFile(const char *workerNodeFilename)
/* allocate worker node structure and set fields */
workerNode = (WorkerNode *) palloc0(sizeof(WorkerNode));
strlcpy(workerNode->workerName, nodeName, WORKER_LENGTH + 1);
strlcpy(workerNode->workerRack, nodeRack, WORKER_LENGTH + 1);
strlcpy(workerNode->workerName, nodeName, WORKER_LENGTH);
strlcpy(workerNode->workerRack, nodeRack, WORKER_LENGTH);
workerNode->workerPort = nodePort;
workerNode->inWorkerFile = true;