Skip to content

Commit 714a4f6

Browse files
sanity null check on localTime
1 parent 49bac53 commit 714a4f6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/wolfsftp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,9 @@ static int SFTP_CreateLongName(WS_SFTPNAME* name)
23052305

23062306
/* get date as calendar date */
23072307
localTime = XGMTIME((const time_t*)&atr->mtime, &localTime);
2308+
if (localTime == NULL) {
2309+
return WS_MEMORY_E;
2310+
}
23082311
getDate(date, sizeof(date), localTime);
23092312
totalSz += WS_DATE_SIZE;
23102313

0 commit comments

Comments
 (0)