From f938e59a39afcefe04f923207fc52f93c5c6aa95 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 7 Jun 2014 22:41:15 +0000 Subject: /* on some platforms time_t may be a float */ In the past, time_t's type was underspecified. But a floating point type would not have worked in practice. Newer specifications effectively forbid it. While cleaning this up, get partly ready for Y2038. ok miod --- src/lib/libssl/src/apps/apps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index 88bffd7d14..00a6d7dd5e 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c @@ -2012,18 +2012,18 @@ args_verify(char ***pargs, int *pargc, int *badarg, BIO *err, if (!argn) *badarg = 1; else { - long timestamp; + long long timestamp; /* * interpret the -attime argument as seconds since * Epoch */ - if (sscanf(argn, "%li", ×tamp) != 1) { + if (sscanf(argn, "%lli", ×tamp) != 1) { BIO_printf(bio_err, "Error parsing timestamp %s\n", argn); *badarg = 1; } - /* on some platforms time_t may be a float */ + /* XXX 2038 truncation */ at_time = (time_t) timestamp; } (*pargs)++; -- cgit v1.2.3-55-g6feb