dtlogin: Resolve format-overflow issues

This commit is contained in:
Peter Howkins
2021-12-23 19:52:47 +00:00
committed by Jon Trulson
parent 238385530d
commit 0332c396c2

View File

@@ -809,7 +809,7 @@ LoadAltDtsResources(struct display *d)
if ((strcmp(dp->d_name, DOT) != 0) && if ((strcmp(dp->d_name, DOT) != 0) &&
(strcmp(dp->d_name, DOTDOT) != 0)) { (strcmp(dp->d_name, DOTDOT) != 0)) {
sprintf (res_file, "%s%s", dirname[j],dp->d_name); snprintf(res_file, sizeof(res_file), "%s%s", dirname[j], dp->d_name);
if ((access (res_file, R_OK)) != 0) if ((access (res_file, R_OK)) != 0)
{ {
Debug("LoadAltDtsResources- cant access %s.\n", Debug("LoadAltDtsResources- cant access %s.\n",