mirror of
http://galexander.org/git/simplesshd.git
synced 2024-12-28 17:08:08 +00:00
don't pass localtime() a pointer into struct timespec (within struct
stat), because there is no guarantee that its tv_sec will be of type time_t
This commit is contained in:
parent
3bc9394101
commit
103812fae8
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user