diff --git a/openssh/sftp-common.c b/openssh/sftp-common.c index 7763fe3..be2a491 100644 --- a/openssh/sftp-common.c +++ b/openssh/sftp-common.c @@ -189,7 +189,8 @@ char * ls_file(const char *name, const struct stat *st, int remote, int si_units) { int ulen, glen, sz = 0; - struct tm *ltime = localtime(&st->st_mtime); + time_t st_time = st->st_mtime; + struct tm *ltime = localtime(&st_time); char *user, *group; char buf[1024], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1]; char sbuf[FMT_SCALED_STRSIZE];