diff options
author | deraadt <> | 2014-06-07 22:41:15 +0000 |
---|---|---|
committer | deraadt <> | 2014-06-07 22:41:15 +0000 |
commit | f938e59a39afcefe04f923207fc52f93c5c6aa95 (patch) | |
tree | 7ddaae43882370ab028951622cbd88f652ec3a27 /src | |
parent | de48c77a08514ed654e05e710444452ffab6d0aa (diff) | |
download | openbsd-f938e59a39afcefe04f923207fc52f93c5c6aa95.tar.gz openbsd-f938e59a39afcefe04f923207fc52f93c5c6aa95.tar.bz2 openbsd-f938e59a39afcefe04f923207fc52f93c5c6aa95.zip |
/* 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 'src')
-rw-r--r-- | src/lib/libssl/src/apps/apps.c | 6 |
1 files changed, 3 insertions, 3 deletions
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, | |||
2012 | if (!argn) | 2012 | if (!argn) |
2013 | *badarg = 1; | 2013 | *badarg = 1; |
2014 | else { | 2014 | else { |
2015 | long timestamp; | 2015 | long long timestamp; |
2016 | /* | 2016 | /* |
2017 | * interpret the -attime argument as seconds since | 2017 | * interpret the -attime argument as seconds since |
2018 | * Epoch | 2018 | * Epoch |
2019 | */ | 2019 | */ |
2020 | if (sscanf(argn, "%li", ×tamp) != 1) { | 2020 | if (sscanf(argn, "%lli", ×tamp) != 1) { |
2021 | BIO_printf(bio_err, | 2021 | BIO_printf(bio_err, |
2022 | "Error parsing timestamp %s\n", | 2022 | "Error parsing timestamp %s\n", |
2023 | argn); | 2023 | argn); |
2024 | *badarg = 1; | 2024 | *badarg = 1; |
2025 | } | 2025 | } |
2026 | /* on some platforms time_t may be a float */ | 2026 | /* XXX 2038 truncation */ |
2027 | at_time = (time_t) timestamp; | 2027 | at_time = (time_t) timestamp; |
2028 | } | 2028 | } |
2029 | (*pargs)++; | 2029 | (*pargs)++; |