Skip to content

Commit 322d7cd

Browse files
authored
Merge pull request #314 from JacobBarthelmeh/static_analysis
sanity null check on localTime
2 parents 37d1b5b + 714a4f6 commit 322d7cd

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)