summaryrefslogtreecommitdiff
path: root/ext/ftp/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r--ext/ftp/ftp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index b6fd56bdb0..0ad8bdb5d3 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -1012,6 +1012,9 @@ ftp_mdtm(ftpbuf_t *ftp, const char *path)
/* figure out the GMT offset */
stamp = time(NULL);
gmt = php_gmtime_r(&stamp, &tmbuf);
+ if (!gmt) {
+ return -1;
+ }
gmt->tm_isdst = -1;
/* apply the GMT offset */