sanity null check on localTime

pull/314/head
Jacob Barthelmeh 2021-01-27 22:06:43 +07:00
parent 49bac53e2f
commit 714a4f6ac6
1 changed files with 3 additions and 0 deletions

View File

@ -2305,6 +2305,9 @@ static int SFTP_CreateLongName(WS_SFTPNAME* name)
/* get date as calendar date */
localTime = XGMTIME((const time_t*)&atr->mtime, &localTime);
if (localTime == NULL) {
return WS_MEMORY_E;
}
getDate(date, sizeof(date), localTime);
totalSz += WS_DATE_SIZE;