added checks for max file size and file name buffer overrun