Fix COV CID 1271010

This commit is contained in:
Jeffrey Crowell 2015-02-21 11:02:21 -05:00
parent 395863f04f
commit 193c9dece0

View File

@ -1506,7 +1506,7 @@ include_trynext:
}
e--;
}
filepath_len = R_MIN ((size_t)(e - file->filename)+1, sizeof (filepath));
filepath_len = R_MIN ((size_t)(e - file->filename)+1, sizeof (filepath) - 1);
memcpy (filepath, file->filename, filepath_len);
strcpy (filepath+filepath_len, buf);
if (tcc_open (s1, filepath) < 0) {