summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-06-07 22:41:15 +0000
committerderaadt <deraadt@openbsd.org>2014-06-07 22:41:15 +0000
commit6a7330418a2f08ea37103af2b446f53bcca18e86 (patch)
tree7178bc4b0bcb5b25c1df5c508816aa6b6639a010 /lib/libssl/src
parenthttp://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=2016265dfbab162ec30718b5e7480add42598158 (diff)
downloadwireguard-openbsd-6a7330418a2f08ea37103af2b446f53bcca18e86.tar.xz
wireguard-openbsd-6a7330418a2f08ea37103af2b446f53bcca18e86.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 'lib/libssl/src')
-rw-r--r--lib/libssl/src/apps/apps.c6
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", &timestamp) != 1) {
+ if (sscanf(argn, "%lli", &timestamp) != 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)++;