Revert "dtfile: coverity CIDs 88363,88405,89140,89612; insecure readlink"

This reverts commit 7fa35c29c4.
This commit is contained in:
Jon Trulson
2018-04-05 15:44:37 -06:00
parent 70f85d77cc
commit 9a3a9e3010
3 changed files with 4 additions and 4 deletions

View File

@@ -825,7 +825,7 @@ ReadFileData(
{
while ((link_len = readlink(link_file_name, link_path, MAX_PATH)) > 0)
{
link_path[link_len-1] = 0;
link_path[link_len] = '\0';
link_list = (char **)XtRealloc((char *)link_list, sizeof(char *) *
(link_count + 2));
@@ -1071,7 +1071,7 @@ ReadFileData2(
{
while ((link_len = readlink(link_file_name, link_path, MAX_PATH)) > 0)
{
link_path[link_len - 1] = 0;
link_path[link_len] = NILL;
link_list = (char **)XtRealloc((char *)link_list, sizeof(char *) *
(link_count + 2));