diff options
| author | deraadt <> | 2014-06-07 22:41:15 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-06-07 22:41:15 +0000 |
| commit | 16e086d4e5aa1e3b351e5c97e3fcfc6ef6bde702 (patch) | |
| tree | 7ddaae43882370ab028951622cbd88f652ec3a27 | |
| parent | ae869ed69546fcf32da0a31d33209356522a6011 (diff) | |
| download | openbsd-16e086d4e5aa1e3b351e5c97e3fcfc6ef6bde702.tar.gz openbsd-16e086d4e5aa1e3b351e5c97e3fcfc6ef6bde702.tar.bz2 openbsd-16e086d4e5aa1e3b351e5c97e3fcfc6ef6bde702.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 '')
| -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)++; |
