8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 15:23:02 +01:00

Fixed CORE-5249: Incorrect use of readlink() system call

This commit is contained in:
Alexander Peshkov 2016-05-23 12:18:44 +03:00
parent f9c8887627
commit 58e8a3210f

View File

@ -482,9 +482,9 @@ bool ConfigFile::translate(const char* fileName, const String& from, String& to)
TEXT temp[MAXPATHLEN];
const int n = readlink(fileName, temp, sizeof(temp));
if (n != -1 && unsigned(n) < sizeof(temp))
if (n != -1)
{
tempPath = temp;
tempPath.assign(temp, n);
if (PathUtils::isRelative(tempPath))
{