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

This commit is contained in:
Jon Trulson
2018-04-01 13:43:48 -06:00
parent b4c4fb594d
commit 7fa35c29c4
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] = '\0';
link_path[link_len-1] = 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] = NILL;
link_path[link_len - 1] = 0;
link_list = (char **)XtRealloc((char *)link_list, sizeof(char *) *
(link_count + 2));