diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-06-07 22:41:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-06-07 22:41:16 +0000 |
commit | 4a837d1fe8af4921d68316825925d1a20789e338 (patch) | |
tree | 2922acd54ae2f37e37be45270d8270b8e742e5e2 /lib | |
parent | 03f954672632bb6771359fe14ed9755dde86ddd7 (diff) |
/* 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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/src/apps/apps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/src/apps/apps.c b/lib/libssl/src/apps/apps.c index 88bffd7d14c..00a6d7dd5e5 100644 --- a/lib/libssl/src/apps/apps.c +++ b/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)++; |