Commits

Serge Zaitsev  committed 95d0520

prevened buffer overflow

  • Participants
  • Parent commits 09e6c4c

Comments (0)

Files changed (1)

 	}
 
 	if (name != NULL) {
-		strncat(path, name, sizeof(path)-1);
+		strncat(path, name, sizeof(path) - strlen(path) - 1);
 	}
 
 	return path;