2888
2888
if (strlen(directory) + strlen(filename) >= sizeof(fullpath)) // Check for buffer overflow on fullpath
2890
2890
fprintf(stderr, "Fatal error while loading %s:\n", filename);
2891
fprintf(stderr, "Size of directory name (%d chars) plus size of file name (%d chars)\n", strlen(directory), strlen(filename));
2892
fprintf(stderr, "is too long (over %d chars), and would cause a buffer overflow...\n", sizeof(fullpath) - 1);
2893
fprintf(stderr, "is too long (over %u chars), and would cause a buffer overflow...\n",
2895
2897
strcpy(fullpath, directory);