small fixes

This commit is contained in:
Vítor Santos Costa
2014-08-04 09:47:03 -05:00
parent a70da52e1f
commit bc16bf83ec
15 changed files with 94 additions and 1682 deletions

View File

@@ -1823,6 +1823,9 @@ TrueFileName (char *source, char *root, char *result, int in_lib, int expand_roo
char ares1[YAP_FILENAME_MAX];
result[0] = '\0';
if (strlen(source) >= YAP_FILENAME_MAX) {
Yap_Error(OPERATING_SYSTEM_ERROR, TermNil, "%s in true_file-name is larger than the buffer size (%d bytes)", source, strlen(source));
}
#if defined(__MINGW32__) || _MSC_VER
/* step 0: replace / by \ */
strncpy(ares1, source, YAP_FILENAME_MAX);